diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-03-19 13:53:45 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-13 11:28:25 +0200 |
commit | dc2ba49207af71193f1390d84bba4e15aeea0ce0 (patch) | |
tree | 79c2a51cb5fa2b87800b1113e0015a7108cd2eb3 /jbig2dec/jbig2.c | |
parent | Import Ghostscript 9.50 (diff) | |
download | ghostscript-gpl-patches-dc2ba49207af71193f1390d84bba4e15aeea0ce0.tar.gz ghostscript-gpl-patches-dc2ba49207af71193f1390d84bba4e15aeea0ce0.tar.bz2 ghostscript-gpl-patches-dc2ba49207af71193f1390d84bba4e15aeea0ce0.zip |
Import Ghostscript 9.52ghostscript-9.52
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'jbig2dec/jbig2.c')
-rw-r--r-- | jbig2dec/jbig2.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/jbig2dec/jbig2.c b/jbig2dec/jbig2.c index 07c7969f..3fc6bf86 100644 --- a/jbig2dec/jbig2.c +++ b/jbig2dec/jbig2.c @@ -179,24 +179,32 @@ jbig2_ctx_new_imp(Jbig2Allocator *allocator, Jbig2Options options, Jbig2GlobalCt #define get_int16(bptr)\ (((int)get_uint16(bptr) ^ 0x8000) - 0x8000) +/* coverity[ -tainted_data_return ] */ +/* coverity[ -tainted_data_argument : arg-0 ] */ int16_t jbig2_get_int16(const byte *bptr) { return get_int16(bptr); } +/* coverity[ -tainted_data_return ] */ +/* coverity[ -tainted_data_argument : arg-0 ] */ uint16_t jbig2_get_uint16(const byte *bptr) { return get_uint16(bptr); } +/* coverity[ -tainted_data_return ] */ +/* coverity[ -tainted_data_argument : arg-0 ] */ int32_t jbig2_get_int32(const byte *bptr) { return ((int32_t) get_int16(bptr) << 16) | get_uint16(bptr + 2); } +/* coverity[ -tainted_data_return ] */ +/* coverity[ -tainted_data_argument : arg-0 ] */ uint32_t jbig2_get_uint32(const byte *bptr) { @@ -373,7 +381,7 @@ jbig2_data_in(Jbig2Ctx *ctx, const unsigned char *data, size_t size) p += 4; segment->data_length = p - s; - jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "unknown length determined to be %u", segment->data_length); + jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "unknown length determined to be %lu", (long) segment->data_length); } else if (segment->data_length > ctx->buf_wr_ix - ctx->buf_rd_ix) return 0; /* need more data */ @@ -384,7 +392,7 @@ jbig2_data_in(Jbig2Ctx *ctx, const unsigned char *data, size_t size) if (ctx->state == JBIG2_FILE_RANDOM_BODIES) { if (ctx->segment_index == ctx->n_segments) ctx->state = JBIG2_FILE_EOF; - } else { /* JBIG2_FILE_SEQUENCIAL_BODY */ + } else { /* JBIG2_FILE_SEQUENTIAL_BODY */ ctx->state = JBIG2_FILE_SEQUENTIAL_HEADER; } if (code < 0) { |