diff options
author | David Robillard <d@drobilla.net> | 2020-07-17 17:20:54 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-17 17:20:54 +0200 |
commit | 8a8410f5330dccb8d213e1acdf938cc4c25003e9 (patch) | |
tree | 56d2375adb045380e8cab1dbb08d7d117df79a9f /src/sord.c | |
parent | e0d568242784d82eb8d8591860f9bba9a37c7927 (diff) | |
download | sord-8a8410f5330dccb8d213e1acdf938cc4c25003e9.tar.gz sord-8a8410f5330dccb8d213e1acdf938cc4c25003e9.tar.bz2 sord-8a8410f5330dccb8d213e1acdf938cc4c25003e9.zip |
Fix potential string null termination issue
Diffstat (limited to 'src/sord.c')
-rw-r--r-- | src/sord.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1085,7 +1085,7 @@ sord_new_literal_counted(SordWorld* world, key.meta.lit.datatype = sord_node_copy(datatype); memset(key.meta.lit.lang, 0, sizeof(key.meta.lit.lang)); if (lang) { - strncpy(key.meta.lit.lang, lang, sizeof(key.meta.lit.lang)); + strncpy(key.meta.lit.lang, lang, sizeof(key.meta.lit.lang) - 1); } return sord_insert_node(world, &key, true); |