diff options
author | Olof-Joachim Frahm <olof@shiftleft.io> | 2020-05-29 11:41:58 +0200 |
---|---|---|
committer | Olof-Joachim Frahm <olof@shiftleft.io> | 2020-05-29 11:41:58 +0200 |
commit | a23571495beb95e146755e16b1a02dff03624625 (patch) | |
tree | e373c1e1e68539407a076003f8b92254941cce17 /src/feh_png.c | |
parent | c9e024daeb43094696a05c8d03ef6682ed683dae (diff) |
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; } |