[trunk] Simplify code and remove bogus out of bound check
This commit is contained in:
parent
6790587db8
commit
f5630ab88e
|
@ -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(¶meters);
|
||||
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));
|
||||
|
|
Loading…
Reference in New Issue