From 677a78b56a215a588496e8b58c0f141d583da338 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Wed, 3 Nov 1999 21:52:16 +0000 Subject: [PATCH] now handle arbitrary buffer sizes. 1999-11-03 Jonathan Blandford * src/io-gif.c (image_load_increment): now handle arbitrary buffer sizes. --- gdk-pixbuf/ChangeLog | 5 +++++ gdk-pixbuf/io-gif.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index b7bab67af3..3be684716d 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +1999-11-03 Jonathan Blandford + + * src/io-gif.c (image_load_increment): now handle arbitrary buffer + sizes. + 1999-11-03 Federico Mena Quintero * src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_init): diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c index bd13889d8a..8b278d8e59 100644 --- a/gdk-pixbuf/io-gif.c +++ b/gdk-pixbuf/io-gif.c @@ -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;