File openjpeg2-CVE-2017-14041.patch of Package openjpeg2

diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c
index f28c98d..2381f3a 100644
--- a/src/bin/jp2/convert.c
+++ b/src/bin/jp2/convert.c
@@ -1115,7 +1115,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,&endian2,signtmp,&prec,temp,&w,temp,&h) != 9){
+    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, "ERROR: Failed to read the right number of element from the fscanf() function!\n");
         return NULL;