From: Mathieu Malaterre Date: Fri, 7 Mar 2014 08:11:49 +0000 (+0000) Subject: [trunk] Simplify code and remove bogus out of bound check X-Git-Tag: version.2.0.1~4^2~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5630ab88e8279fbb011e6f33d1f5bd759a220b1;p=openjpeg [trunk] Simplify code and remove bogus out of bound check --- diff --git a/tests/comparePGXimages.c b/tests/comparePGXimages.c index dfd72a24..77714ddc 100644 --- a/tests/comparePGXimages.c +++ b/tests/comparePGXimages.c @@ -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));