diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2009-01-02 15:10:33 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2009-01-02 15:10:33 +0000 |
commit | 3d260f6e75da2ee2b1dd0b933e9f2552cf66f2d5 (patch) | |
tree | 7cde4e0961bf1eeea67b2476114bb535784bc2b4 /gtk/gtk_throbber.c | |
parent | cc4ff674389c22f8ec24df5b4930a359af46cf30 (diff) | |
download | netsurf-3d260f6e75da2ee2b1dd0b933e9f2552cf66f2d5.tar.gz netsurf-3d260f6e75da2ee2b1dd0b933e9f2552cf66f2d5.tar.bz2 |
Fix warnings and formatting
svn path=/trunk/netsurf/; revision=5956
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 */ |