projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5597522
)
pgxtoimage(): fix write stack buffer overflow (#997)
author
Even Rouault
<even.rouault@spatialys.com>
Fri, 18 Aug 2017 11:39:20 +0000
(13:39 +0200)
committer
Even Rouault
<even.rouault@spatialys.com>
Fri, 18 Aug 2017 11:39:20 +0000
(13:39 +0200)
src/bin/jp2/convert.c
patch
|
blob
|
history
diff --git
a/src/bin/jp2/convert.c
b/src/bin/jp2/convert.c
index 5459f7d44533e0fccc66a4be5eb7fc01cc7f731c..e606c9be70fb55d4a231a7675c55e00c2b9daac6 100644
(file)
--- a/
src/bin/jp2/convert.c
+++ b/
src/bin/jp2/convert.c
@@
-1185,7
+1185,7
@@
opj_image_t* pgxtoimage(const char *filename, opj_cparameters_t *parameters)
}
fseek(f, 0, SEEK_SET);
- if (fscanf(f, "PG%
[ \t]%c%c%[ \t+-]%d%[ \t]%d%
[ \t]%d", temp, &endian1,
+ if (fscanf(f, "PG%
31[ \t]%c%c%31[ \t+-]%d%31[ \t]%d%31
[ \t]%d", temp, &endian1,
&endian2, signtmp, &prec, temp, &w, temp, &h) != 9) {
fclose(f);
fprintf(stderr,