diff options
author | Julien BLACHE <jblache@debian.org> | 2011-02-04 19:56:33 +0100 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2014-10-03 14:05:58 +0000 |
commit | eb2d7e4cf8eebc85bb69b8a6fb646acc6192ccbb (patch) | |
tree | 46ef29d04500bc92897f24ebe1e93e1c16cf4bfb /src/xsane-preview.c | |
parent | bbb14791f2535cea66c313d069020b84c2c0fad2 (diff) | |
parent | ca9f280d0ac4173cdd29f745fd574a3b597969e7 (diff) |
Imported Debian patch 0.998-1debian/0.998-1
Diffstat (limited to 'src/xsane-preview.c')
-rw-r--r-- | src/xsane-preview.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/xsane-preview.c b/src/xsane-preview.c index c6122d5..f089dd1 100644 --- a/src/xsane-preview.c +++ b/src/xsane-preview.c @@ -3,7 +3,7 @@ xsane-preview.c Oliver Rauch <Oliver.Rauch@rauch-domain.de> - Copyright (C) 1998-2007 Oliver Rauch + Copyright (C) 1998-2010 Oliver Rauch This file is part of the XSANE package. This program is free software; you can redistribute it and/or modify @@ -2100,6 +2100,7 @@ int preview_create_batch_icon_from_file(Preview *p, FILE *in, Batch_Scan_Paramet int xx, yy; int offset = 0; guchar *data; + size_t bytes_read; DBG(DBG_proc, "preview_create_batch_icon_from_file\n"); @@ -2245,13 +2246,13 @@ int preview_create_batch_icon_from_file(Preview *p, FILE *in, Batch_Scan_Paramet { fseek(in, header + (xoffset + (int)(x * scale) + (yoffset + (int)(y * scale)) * image_width) * 6, SEEK_SET); - fread(&r, 2, 1, in); /* read 16 bit value in machines byte order */ + bytes_read = fread(&r, 2, 1, in); /* read 16 bit value in machines byte order */ r = preview_gamma_data_red[r >> rotate16]; - fread(&g, 2, 1, in); + bytes_read = fread(&g, 2, 1, in); g = preview_gamma_data_green[g >> rotate16]; - fread(&b, 2, 1, in); + bytes_read = fread(&b, 2, 1, in); b = preview_gamma_data_blue[b >> rotate16]; c = r * 65536 + g * 256 + b; |