]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Fix invalid write access in JPIP code.
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 26 Feb 2014 09:35:11 +0000 (09:35 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 26 Feb 2014 09:35:11 +0000 (09:35 +0000)
Fixes issue 261

src/lib/openjpip/msgqueue_manager.c

index 6cb1954486ee7e156bc0640634e6f9461110792f..fab9a59ca146d0f02be6929ee5ffd9e931ad0ef5 100644 (file)
@@ -692,7 +692,7 @@ placeholder_param_t * parse_phld( Byte_t *datastream, Byte8_t metalength)
   phld = (placeholder_param_t *)opj_malloc( sizeof(placeholder_param_t));
   
   phld->LBox = big4( datastream);
-  strcpy( phld->TBox, "phld");
+  strncpy( phld->TBox, "phld", 4);
   phld->Flags = big4( datastream+8);
   phld->OrigID = big8( datastream+12);
   phld->OrigBHlen = (Byte_t)(metalength - 20);