Skip to content

Unsigned left shift in zigzag8 in case of negative#1

Merged
Geolm merged 1 commit intoGeolm:mainfrom
skeeto:fix-signed-shift
Mar 24, 2026
Merged

Unsigned left shift in zigzag8 in case of negative#1
Geolm merged 1 commit intoGeolm:mainfrom
skeeto:fix-signed-shift

Conversation

@skeeto
Copy link
Copy Markdown
Contributor

@skeeto skeeto commented Feb 12, 2026

If v is negative, the left shift was undefined.

$ cc -g3 -fsanitize=undefined test/test.c
$ ./a.out >/dev/null
test/../lite_encoding.h:378:25: runtime error: left shift of negative value -1

If v is negative, the left shift was undefined.
@Geolm Geolm merged commit 3c2fe51 into Geolm:main Mar 24, 2026
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.

2 participants