Skip to content

Fix shift out of bound undefined behavior #394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mjyang5566
Copy link

Since that the C implicit conversion will do Integral promotion on buf to 'int'
(which is a unsigned short) If the value of buf[3] is larger than 127, than the
int cannot hold it, result in an undefined behavior.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant