After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771223 - integer truncation in /gllib/uniname/uninames.h
integer truncation in /gllib/uniname/uninames.h
Status: RESOLVED FIXED
Product: gnome-characters
Classification: Other
Component: general
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Characters maintainer(s)
GNOME Characters maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-09-11 02:00 UTC by Mohammed Sadiq
Modified: 2016-09-12 07:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Regenerate uninames.h (1.02 KB, patch)
2016-09-12 07:46 UTC, Daiki Ueno
committed Details | Review

Description Mohammed Sadiq 2016-09-11 02:00:15 UTC
The relevant compilation output from gcc6. The max possible value of uint16_t is 65535.

In file included from /home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uniname.c:38:0:
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11809:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 66782, 11482 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11810:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 68770, 11624 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11811:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 69220, 11654 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11812:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 70340, 11724 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11813:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 70680, 11744 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11814:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 71058, 11765 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11815:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 71210, 11773 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11816:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 71230, 11774 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11817:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 71293, 11777 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11818:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 71337, 11779 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11819:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 71360, 11780 },
     ^~~~~
/home/sadiq/jhbuild/checkout/gnome-characters/gllib/uniname/uninames.h:11820:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   { 71408, 11782 }
     ^~~~~
Comment 1 Daiki Ueno 2016-09-12 07:46:37 UTC
Created attachment 335337 [details] [review]
build: Regenerate uninames.h

To avoid integer overflow in the unicode_name_by_length table.
Comment 2 Daiki Ueno 2016-09-12 07:47:38 UTC
Thanks for pointing that out.

Attachment 335337 [details] pushed as ca533b3 - build: Regenerate uninames.h