Fix svace issues in arastorage and testcases for that
utc_arastorage_main.c
- Use of vulnerable function 'sprintf' at utc_arastorage_main.c:165. This function is unsafe, use snprintf instead.
- After having been assigned to NULL value at utc_arastorage_main.c:851, pointer '0' is passed as 1st parameter in call to function 'cursor_move_last' at utc_arastorage_main.c:851, where it is dereferenced at cursor.c:80.
- After having been assigned to NULL value at utc_arastorage_main.c:773, pointer '0' is passed as 1st parameter in call to function 'cursor_move_next' at utc_arastorage_main.c:773, where it is dereferenced at cursor.c:86.
- After having been assigned to NULL value at utc_arastorage_main.c:812, pointer '0' is passed as 1st parameter in call to function 'cursor_move_prev' at utc_arastorage_main.c:812, where it is dereferenced at cursor.c:92.
- Expression '(count)' has type 'tuple_id_t' ('unsigned int'), so it's never less than zero
storage_interface.c
- Copying from string 'filename' to '&g_storage_write_buffer.file_name[0]' without null termination at storage_interface.c:557 by calling function 'memcpy'.
- Copying from parameter string 'name' to '&rel->name[0]' at storage_interface.c:184 may form a non-terminated C string of size 17.
aql_exec.c
- This statement in the source code might be unreachable during program execution.
index_bplustree.c
- Dynamic memory referenced by 'path' was allocated at index_bplustree.c:1376 by calling function 'malloc' and lost at index_bplustree.c:1391.
- The handle 'fd' was created at storage_abstraction.c:51 by calling function 'storage_open' at index_bplustree.c:522 and lost at index_bplustree.c:527.
relation.c
- Dynamic memory referenced by 'cursor' was allocated at relation.c:1064 by calling function 'malloc' and lost at relation.c:1102.