projects
/
platform
/
core
/
uifw
/
lottie-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74daa05
)
stb: added exceptional handling.
author
Hermet Park
<hermetpark@gmail.com>
Wed, 4 Sep 2019 08:23:10 +0000
(17:23 +0900)
committer
Hermet Park
<hermetpark@gmail.com>
Wed, 4 Sep 2019 08:29:01 +0000
(17:29 +0900)
ftell() could return -1 but fseek() doesn't allow minus values.
Modified to skip irritating coverity report.
Change-Id: Id2dbe0bb0852b3b30f5afe86b1677c99d5229e03
src/vector/stb/stb_image.h
patch
|
blob
|
history
diff --git
a/src/vector/stb/stb_image.h
b/src/vector/stb/stb_image.h
index
8c85e52
..
61d9224
100644
(file)
--- 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