mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 00:23:23 +00:00
Removed liquivision unneeded variable and potential segfault.
Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f85e406855
commit
3f707256d9
1 changed files with 1 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue