[trunk] Simplify code and remove bogus out of bound check

This commit is contained in:
Mathieu Malaterre 2014-03-07 08:11:49 +00:00
parent 6790587db8
commit f5630ab88e
1 changed files with 1 additions and 2 deletions

View 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));