mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
now handle arbitrary buffer sizes.
1999-11-03 Jonathan Blandford <jrb@redhat.com> * src/io-gif.c (image_load_increment): now handle arbitrary buffer sizes.
This commit is contained in:
parent
0b0e66db4b
commit
677a78b56a
@ -1,3 +1,8 @@
|
||||
1999-11-03 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* src/io-gif.c (image_load_increment): now handle arbitrary buffer
|
||||
sizes.
|
||||
|
||||
1999-11-03 Federico Mena Quintero <federico@redhat.com>
|
||||
|
||||
* src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_init):
|
||||
|
@ -184,7 +184,7 @@ ReadOK (GifContext *context, guchar *buffer, size_t len)
|
||||
#endif
|
||||
if ((context->size - context->ptr) >= len) {
|
||||
count += len;
|
||||
memcpy (buffer, context->buf + context->ptr, len);
|
||||
memmove (buffer, context->buf + context->ptr, len);
|
||||
context->ptr += len;
|
||||
context->amount_needed = 0;
|
||||
#ifdef IO_GIFDEBUG
|
||||
@ -1030,7 +1030,7 @@ image_load_increment (gpointer data, guchar *buf, guint size)
|
||||
} else {
|
||||
/* copy the left overs to the begining of the buffer */
|
||||
/* and realloc the memory */
|
||||
memcpy (context->buf, context->buf, context->size - context->ptr);
|
||||
memmove (context->buf, context->buf + context->ptr, context->size - context->ptr);
|
||||
context->buf = g_realloc (context->buf, context->amount_needed + (context->size - context->ptr));
|
||||
}
|
||||
context->size = context->size - context->ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user