mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-10-02 14:31:05 +02:00
FIX: a bug that was leading to Python and valgrind errors
This commit is contained in:
parent
ced8210ff0
commit
3e82fd9ae8
@ -727,7 +727,7 @@ trexio_open(const char* file_name, const char mode,
|
||||
|
||||
/* Data for the parent type */
|
||||
|
||||
strncpy(result->file_name, file_name, TREXIO_MAX_FILENAME_LENGTH-1);
|
||||
strncpy(result->file_name, file_name, TREXIO_MAX_FILENAME_LENGTH);
|
||||
if (result->file_name[TREXIO_MAX_FILENAME_LENGTH-1] != '\0') {
|
||||
free(result);
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user