Skip to content

Prevent reading uninitialized memory in unix_detect_thp()#1297

Open
svart-riddare wants to merge 1 commit into
microsoft:dev3from
svart-riddare:dev3-prevent-reading-uninitialized-memory
Open

Prevent reading uninitialized memory in unix_detect_thp()#1297
svart-riddare wants to merge 1 commit into
microsoft:dev3from
svart-riddare:dev3-prevent-reading-uninitialized-memory

Conversation

@svart-riddare
Copy link
Copy Markdown

buf[32] contains uninitialized memory; once reading the file content we search for a particular string which, if not found in the file read, leads to comparing uninitialized bytes at the end of buf to the string we are looking for, leading to undefined behavior (altough it would be highly unlikely that the uninitialized bytes would contain the string we are looking for).

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