Bug 689870 - unsigned fields read as int
Summary: unsigned fields read as int
Status: RESOLVED FIXED
Alias: None
Product: jbig2dec
Classification: Unclassified
Component: Parsing (show other bugs)
Version: master
Hardware: PC Linux
: P4 normal
Assignee: Henry Stiles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-26 12:16 UTC by Ralph Giles
Modified: 2011-05-11 21:46 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Giles 2008-05-26 12:16:02 UTC
In debugging bug 689841, I noticed the data_length field in the segment header
was getting sign extended on x86_64. This is because jbig2_get_int32 is
returning a signed integer even though the field is a uint32_t in the format. So
we've been mishandling any segment length over 2^31, it just hasn't come up before.

The code should be reviewed and either change jbig2_get_int32 to
jbig2_get_uint32 or add a second call, depending on how many signed fields we
need to read.