This repository was archived by the owner on Jun 2, 2025. It is now read-only.
Commit 0a6d266
committed
Fix signed integer overflow on shift
Shifting a signed integer value of 1 by 31 or more bits will cause
overflow and can lead to undefined behaviour. Fix this by adding
a UL suffix to ensure an unsigned long is being shifted.
Signed-off-by: Colin Ian King colin.king@canonical.com
Signed-off-by: Haitao Huang <4699115+haitaohuang@users.noreply.github.com>1 parent bf768a4 commit 0a6d266
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
0 commit comments