[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 */
|
/* set encoding parameters to default values */
|
||||||
opj_set_default_encoder_parameters(¶meters);
|
opj_set_default_encoder_parameters(¶meters);
|
||||||
parameters.decod_format = PGX_DFMT;
|
parameters.decod_format = PGX_DFMT;
|
||||||
strncpy(parameters.infile, filename, sizeof(parameters.infile)-1);
|
strcpy(parameters.infile, filename);
|
||||||
assert( parameters.infile[sizeof(parameters.infile)] == 0 );
|
|
||||||
|
|
||||||
/* Allocate memory*/
|
/* Allocate memory*/
|
||||||
param_image_read = malloc((size_t)nbFilenamePGX * sizeof(opj_image_cmptparm_t));
|
param_image_read = malloc((size_t)nbFilenamePGX * sizeof(opj_image_cmptparm_t));
|
||||||
|
|
Loading…
Reference in New Issue