diff options
author | John Van Ostrand <john@vanostrand.com> | 2014-11-09 13:03:06 -0500 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-10 12:14:56 -0800 |
commit | 3f707256d9cea29c102fbeef9b901d0cf6460d7b (patch) | |
tree | ed401a99787dfa6cebc968cf8e1d3860a41bd05c /liquivision.c | |
parent | f85e4068553fc53cc1adbcabcf41d12ecd3ee378 (diff) | |
download | subsurface-3f707256d9cea29c102fbeef9b901d0cf6460d7b.tar.gz |
Removed liquivision unneeded variable and potential segfault.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'liquivision.c')
-rw-r--r-- | liquivision.c | 6 |
1 files changed, 1 insertions, 5 deletions
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); |