]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Simplify code and remove bogus out of bound check
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 7 Mar 2014 08:11:49 +0000 (08:11 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 7 Mar 2014 08:11:49 +0000 (08:11 +0000)
tests/comparePGXimages.c

index dfd72a24bacfbe11555e6c90a17e9d5206567c7d..77714ddcafb4a4347862fa3b6e6d0a2dabd764f5 100644 (file)
@@ -240,8 +240,7 @@ static opj_image_t* readImageFromFilePGX(const char* filename, int nbFilenamePGX
   /* set encoding parameters to default values */
   opj_set_default_encoder_parameters(&parameters);
   parameters.decod_format = PGX_DFMT;
-  strncpy(parameters.infile, filename, sizeof(parameters.infile)-1);
-  assert( parameters.infile[sizeof(parameters.infile)] == 0 );
+  strcpy(parameters.infile, filename);
 
   /* Allocate memory*/
   param_image_read = malloc((size_t)nbFilenamePGX * sizeof(opj_image_cmptparm_t));