diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-02-28 09:59:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 09:59:30 +0100 |
commit | 32924c21ca08e7203ffb376896a4012bd46f1f93 (patch) | |
tree | 2a7079ad7c7bea1c30494ff29eb28ffff94fa14a /src/feh_png.c | |
parent | 61d17588149df64e54734330103ebe0622a8caa0 (diff) | |
parent | a23571495beb95e146755e16b1a02dff03624625 (diff) |
Merge pull request #531 from Ferada/fix-some-warnings
Fix some warnings from `gcc`.
Diffstat (limited to 'src/feh_png.c')
-rw-r--r-- | src/feh_png.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/feh_png.c b/src/feh_png.c index d0c1c8a..8f5b94d 100644 --- a/src/feh_png.c +++ b/src/feh_png.c @@ -197,7 +197,10 @@ int feh_png_file_is_png(FILE * fp) { unsigned char buf[8]; - fread(buf, 1, 8, fp); + if (fread(buf, 1, 8, fp) != 8) { + return 0; + } + if (png_sig_cmp(buf, 0, 8)) { return 0; } |