From 3f707256d9cea29c102fbeef9b901d0cf6460d7b Mon Sep 17 00:00:00 2001 From: John Van Ostrand Date: Sun, 9 Nov 2014 13:03:06 -0500 Subject: Removed liquivision unneeded variable and potential segfault. Signed-off-by: John Van Ostrand Signed-off-by: Dirk Hohndel --- liquivision.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'liquivision.c') diff --git a/liquivision.c b/liquivision.c index 423486469..5ec241cb4 100644 --- a/liquivision.c +++ b/liquivision.c @@ -337,7 +337,6 @@ static void parse_dives (int log_version, const unsigned char *buf, unsigned int int try_to_open_liquivision(const char *filename, struct memblock *mem) { - void *name; const unsigned char *buf = mem->buffer; unsigned int buf_size = mem->size; unsigned int ptr; @@ -345,10 +344,7 @@ int try_to_open_liquivision(const char *filename, struct memblock *mem) // Get name unsigned int len = array_uint32_le(buf); - if (len) { - name = malloc(len); - strncpy(name, buf + 4, len); - } + // Ignore name ptr = 4 + len; unsigned int dive_count = array_uint32_le(buf + ptr); -- cgit v1.2.3-70-g09d2