summaryrefslogtreecommitdiff
path: root/src/nautilus-file-undo-operations.c
diff options
context:
space:
mode:
authorMohammed Sadiq <sadiq@sadiqpk.org>2017-08-23 20:05:43 +0530
committerErnestas Kulik <ernestask@gnome.org>2017-08-23 18:50:05 +0300
commit3ec65acf4bb60ef2f0cf870f3f50e3555a5af371 (patch)
treed5d4da8883a3d095b5306c7309cc5615f70fc32c /src/nautilus-file-undo-operations.c
parentb3596e387d839899000908a22678fd26a52250a2 (diff)
downloadnautilus-3ec65acf4bb60ef2f0cf870f3f50e3555a5af371.tar.gz
file: use unsigned int when shifting 31 bits
In C, as numbers are signed integers by default, it is an Undefined Behaviour to left shift a signed integer by 31 bits (when the integer size is 32 bits which is the common size where nautilus runs). So explicitly use unsigned integer. This issue was found by UBsan: nautilus/src/nautilus-file.c:312:14: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' nautilus/src/nautilus-file.c:4273:11: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' nautilus/src/nautilus-file.c:366:18: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' https://bugzilla.gnome.org/show_bug.cgi?id=786685
Diffstat (limited to 'src/nautilus-file-undo-operations.c')
0 files changed, 0 insertions, 0 deletions