Skip to content

aml: A store into a buffer keeps the buffer's length - #379

Open
ogoffart wants to merge 1 commit into
rust-osdev:mainfrom
ogoffart:olivier/store-buffer-length
Open

ogoffart wants to merge 1 commit into
rust-osdev:mainfrom
ogoffart:olivier/store-buffer-length

Conversation

@ogoffart

Copy link
Copy Markdown
Contributor

Storing a buffer into a buffer replaced it, length included. As in ACPICA, the source is now copied into the buffer, which keeps its length: the rest is zeroed, or the source cut. An empty buffer takes the source's length.

Found on a Dell XPS 13 7390, whose _BIF stores each text into a buffer one byte longer, then sets that last byte for its null: it failed with IndexOutOfBounds, and the battery read nothing.

Storing a buffer into a buffer replaced it, length included. As in
ACPICA, the source is now copied into the buffer, which keeps its length:
the rest is zeroed, or the source cut. An empty buffer takes the source's
length.

Found on a Dell XPS 13 7390, whose _BIF stores each text into a buffer one
byte longer, then sets that last byte for its null: it failed with
IndexOutOfBounds, and the battery read nothing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant