From f5630ab88e8279fbb011e6f33d1f5bd759a220b1 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Fri, 7 Mar 2014 08:11:49 +0000 Subject: [PATCH] [trunk] Simplify code and remove bogus out of bound check --- tests/comparePGXimages.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)); -- 2.40.0