summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sord.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sord.c b/src/sord.c
index 0e830b7..a8a0c63 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -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);