diff options
author | David Robillard <d@drobilla.net> | 2016-09-18 14:20:21 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-09-18 14:20:21 -0400 |
commit | 7a68f1e59abd84574d8b8ccf6289b6c01bf428c6 (patch) | |
tree | 2014bee02f74d5091146c1ec9b22124f55faa81d | |
parent | 2bb30b516903c8004bd86c16d9ed17be98ec0e7d (diff) | |
download | lilv-7a68f1e59abd84574d8b8ccf6289b6c01bf428c6.tar.gz lilv-7a68f1e59abd84574d8b8ccf6289b6c01bf428c6.tar.bz2 lilv-7a68f1e59abd84574d8b8ccf6289b6c01bf428c6.zip |
Fix short string allocation
-rw-r--r-- | src/world.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c index 01f4ebe..622e0a5 100644 --- a/src/world.c +++ b/src/world.c @@ -1181,7 +1181,7 @@ lilv_world_get_symbol(LilvWorld* world, const LilvNode* subject) // Replace invalid characters const size_t len = strlen(str); - char* const sym = (char*)calloc(1, len); + char* const sym = (char*)calloc(1, len + 1); for (size_t i = 0; i < len; ++i) { const char c = str[i]; if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || |