Skip to content

Unsigned left shift in zigzag8 in case of negative#1

Open
skeeto wants to merge 1 commit intoGeolm:mainfrom
skeeto:fix-signed-shift
Open

Unsigned left shift in zigzag8 in case of negative#1
skeeto wants to merge 1 commit intoGeolm:mainfrom
skeeto:fix-signed-shift

Conversation

@skeeto
Copy link

@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.
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