diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2020-03-11 16:35:53 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2020-03-20 20:49:02 +0800 |
commit | 9b5008aa2bc1c6a6acb2c6f90d1ef8d6bad9e66a (patch) | |
tree | c49fc2a1cf205cbb13bd5690d9f5c2f0f3e9684d /gpdl | |
parent | ea9b3a676a516a603fabb593085d14a67356db6f (diff) | |
download | ghostpdl-9b5008aa2bc1c6a6acb2c6f90d1ef8d6bad9e66a.tar.gz |
jbig2dec: Pass segment numbers as unsigned values to error callback.
According to the JBIG2 specification segments numbers are 32 bit unsigned
integer. Previously any segment numbers larger than INT32_MAX would be passed
as negative numbers.
Some parts of the decoder do not yet know, or do not have access to the
currently decoded segment number, and this needs to be specially indicated.
Therefore jbig2dec appropriates the unlikely segment number 0xffffffff to
indicate an unknown segment number.
This is a change of the public API.
Diffstat (limited to 'gpdl')
-rw-r--r-- | gpdl/jbig2top.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gpdl/jbig2top.c b/gpdl/jbig2top.c index 4f872215f..a668e1b30 100644 --- a/gpdl/jbig2top.c +++ b/gpdl/jbig2top.c @@ -370,7 +370,7 @@ static JB2_Error JB2_Callback my_output(unsigned char *buffer, } #else -static void my_errors(void *data, const char *msg, Jbig2Severity severity, int32_t seg_idx) +static void my_errors(void *data, const char *msg, Jbig2Severity severity, uint32_t seg_idx) { /* Do nothing */ } |