From a2f90ab2cbad0678d66940d3418fea342f1b48b4 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Wed, 12 Mar 2014 11:55:54 +0000 Subject: [PATCH] [1.5] Prevent buffer overflow in openjpip code --- applications/jpip/libopenjpip/msgqueue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/jpip/libopenjpip/msgqueue_manager.c b/applications/jpip/libopenjpip/msgqueue_manager.c index 5123f797..82d7f9e0 100644 --- a/applications/jpip/libopenjpip/msgqueue_manager.c +++ b/applications/jpip/libopenjpip/msgqueue_manager.c @@ -677,7 +677,7 @@ placeholder_param_t * parse_phld( Byte_t *datastream, Byte8_t metalength) phld = (placeholder_param_t *)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 = metalength - 20;