diff options
Diffstat (limited to 'gtk/gtk_throbber.c')
-rw-r--r-- | gtk/gtk_throbber.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtk_throbber.c b/gtk/gtk_throbber.c index 86b5f3318..6e46c8523 100644 --- a/gtk/gtk_throbber.c +++ b/gtk/gtk_throbber.c @@ -125,7 +125,12 @@ bool nsgtk_throbber_initialise_from_gif(const char *fn) /* allocate a block of sufficient size, and load the data in. */ data = (unsigned char *)malloc(size); - fread(data, size, 1, fh); + if (fread(data, size, 1, fh) != 1) { + /* interesting; we couldn't read it all in. */ + fclose(fh); + free(data); + return false; + } fclose(fh); /* create our gif animation */ |