From: Hermet Park Date: Wed, 4 Sep 2019 08:23:10 +0000 (+0900) Subject: stb: added exceptional handling. X-Git-Tag: submit/tizen/20190905.064609~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=985ee2ecaf89e254cb1f8c1c3ca34a254e08ead4;p=platform%2Fcore%2Fuifw%2Flottie-player.git stb: added exceptional handling. ftell() could return -1 but fseek() doesn't allow minus values. Modified to skip irritating coverity report. Change-Id: Id2dbe0bb0852b3b30f5afe86b1677c99d5229e03 --- diff --git a/src/vector/stb/stb_image.h b/src/vector/stb/stb_image.h index 8c85e52..61d9224 100644 --- a/src/vector/stb/stb_image.h +++ b/src/vector/stb/stb_image.h @@ -7208,7 +7208,7 @@ STBIDEF int stbi_is_16_bit_from_file(FILE *f) long pos = ftell(f); stbi__start_file(&s, f); r = stbi__is_16_main(&s); - fseek(f,pos,SEEK_SET); + if (pos >= 0) fseek(f,pos,SEEK_SET); return r; } #endif // !STBI_NO_STDIO