-const char deanimate_rcs[] = "$Id: deanimate.c,v 1.12.2.1 2004/10/03 12:53:32 david__schmidt Exp $";
+const char deanimate_rcs[] = "$Id: deanimate.c,v 1.14 2006/07/18 14:48:45 david__schmidt Exp $";
/*********************************************************************
*
- * File : $Source: /cvsroot/ijbswa/current/Attic/deanimate.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/deanimate.c,v $
*
* Purpose : Declares functions to manipulate binary images on the
* fly. High-level functions include:
* buf_copy, buf_getbyte, gif_skip_data_block,
* gif_extract_image and jpeg_inspect
*
- * Copyright : Written by and Copyright (C) 2001 - 2004 by the the
+ * Copyright : Written by and Copyright (C) 2001 - 2004, 2006 by the
* SourceForge Privoxy team. http://www.privoxy.org/
*
* Based on the GIF file format specification (see
*
* Revisions :
* $Log: deanimate.c,v $
+ * Revision 1.14 2006/07/18 14:48:45 david__schmidt
+ * Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch)
+ * with what was really the latest development (the v_3_0_branch branch)
+ *
* Revision 1.12.2.1 2004/10/03 12:53:32 david__schmidt
* Add the ability to check jpeg images for invalid
* lengths of comment blocks. Defensive strategy
* Returns : The byte on success, or 0 on failiure
*
*********************************************************************/
-unsigned char buf_getbyte(struct binbuffer *src, size_t offset)
+unsigned char buf_getbyte(const struct binbuffer *src, size_t offset)
{
if (src->offset + offset < src->size)
{
*/
while((c = buf_getbyte(buf, 0)) != '\0')
{
- if ((buf->offset += c + 1) >= buf->size - 1)
+ buf->offset += (size_t)c + 1;
+ if (buf->offset >= buf->size - 1)
{
return 1;
}