-const char deanimate_rcs[] = "$Id: deanimate.c,v 1.17 2007/08/05 13:42:22 fabiankeil Exp $";
+const char deanimate_rcs[] = "$Id: deanimate.c,v 1.18 2008/03/28 15:13:38 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/deanimate.c,v $
*
* Revisions :
* $Log: deanimate.c,v $
+ * Revision 1.18 2008/03/28 15:13:38 fabiankeil
+ * Remove inspect-jpegs action.
+ *
* Revision 1.17 2007/08/05 13:42:22 fabiankeil
* #1763173 from Stefan Huehner: declare some more functions static.
*
*/
if (c & 0x80)
{
- if (buf_copy(src, dst, (size_t) 3 * (1 << ((c & 0x07) + 1))))
+ int map_length = 3 * (1 << ((c & 0x07) + 1));
+ if (map_length <= 0)
+ {
+ log_error(LOG_LEVEL_DEANIMATE,
+ "colormap length = %d (%c)?", map_length, c);
+ return 1;
+ }
+ if (buf_copy(src, dst, (size_t)map_length))
{
return 1;
}
*/
if(c & 0x80)
{
- if (buf_copy(src, dst, (size_t) 3 * (1 << ((c & 0x07) + 1))))
+ int map_length = 3 * (1 << ((c & 0x07) + 1));
+ if (map_length <= 0)
+ {
+ log_error(LOG_LEVEL_DEANIMATE,
+ "colormap length = %d (%c)?", map_length, c);
+ return 1;
+ }
+ if (buf_copy(src, dst, (size_t)map_length))
{
return 1;
}