From: robertlipe Date: Tue, 11 Dec 2012 18:52:02 +0000 (+0000) Subject: Lowrance: fix memory corruption on read of empty route description. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~729 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=33617d2daa37994a72167b76c9f22440a9eb1424;p=gpsbabel.git Lowrance: fix memory corruption on read of empty route description. --- diff --git a/gpsbabel/lowranceusr4.c b/gpsbabel/lowranceusr4.c index 7c00c01fe..a0c7520fa 100644 --- a/gpsbabel/lowranceusr4.c +++ b/gpsbabel/lowranceusr4.c @@ -656,7 +656,7 @@ lowranceusr4_parse_trails(void) text_len = lowranceusr4_readstr(&buff[0], MAXUSRSTRINGSIZE, file_in, 2); if (text_len) { buff[text_len] = '\0'; - trk_head->rte_desc = buff; + trk_head->rte_desc = xstrdup(buff); } /* Creation date/time, discard for now */