X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=src%2Fimage_load_jpeg.c;h=2bb27a83ecb32b948702e9d4adfcf871b222092b;hp=69f31f50c2915baebea9cbbd27b18ec0be45706e;hb=abee14da6391259e359e222fb51c116dc19d554d;hpb=68c2de35a06094f47d2b9737a0d78362d9cb5e45 diff --git a/src/image_load_jpeg.c b/src/image_load_jpeg.c index 69f31f50..2bb27a83 100644 --- a/src/image_load_jpeg.c +++ b/src/image_load_jpeg.c @@ -96,7 +96,8 @@ static void convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo, guchar **lines) { - gint i, j; + gint i; + guint j; g_return_if_fail (cinfo != NULL); g_return_if_fail (cinfo->output_components == 4); @@ -220,7 +221,7 @@ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes) { struct jpeg_source_mgr* src = (struct jpeg_source_mgr*) cinfo->src; - if (num_bytes > src->bytes_in_buffer) + if ((gulong)num_bytes > src->bytes_in_buffer) { ERREXIT(cinfo, JERR_INPUT_EOF); }