From: Hermet Park Date: Wed, 4 Sep 2019 08:26:26 +0000 (+0900) Subject: stb: added exceptional handling. X-Git-Tag: submit/tizen/20190905.064609^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0bc826ba91f63ac5555b28b15fc310c80fb3ccda;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: I7f66c2d0a3514d324ad23159c20be9fe1bb17724 --- diff --git a/src/vector/stb/stb_image.h b/src/vector/stb/stb_image.h index 61d9224..acfdfc0 100644 --- a/src/vector/stb/stb_image.h +++ b/src/vector/stb/stb_image.h @@ -7187,7 +7187,7 @@ STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) long pos = ftell(f); stbi__start_file(&s, f); r = stbi__info_main(&s,x,y,comp); - fseek(f,pos,SEEK_SET); + if (pos >= 0) fseek(f,pos,SEEK_SET); return r; }