diff options
author | mbkma <[email protected]> | 2025-08-14 17:07:17 +0200 |
---|---|---|
committer | mbkma <[email protected]> | 2025-08-14 17:07:17 +0200 |
commit | 420dcec34bbc9b20bd79f2dc84c1a810c06dbb84 (patch) | |
tree | 5372d3ff59cf6422483c8a3ce8b2e4eb33553a62 /src/parser.c | |
parent | 7ef327f6f269c7a49357e001cd41d7aaf5807749 (diff) | |
download | mate-calc-420dcec34bbc9b20bd79f2dc84c1a810c06dbb84.tar.bz2 mate-calc-420dcec34bbc9b20bd79f2dc84c1a810c06dbb84.tar.xz |
add missing byte in malloc for null terminatorfix/malloc
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.c b/src/parser.c index d60c142..c9d711b 100644 --- a/src/parser.c +++ b/src/parser.c @@ -343,7 +343,7 @@ p_check_variable(ParserState* state, gchar* name) if(utf8_next_char(name)[0] != '\0') { result = 1; - buffer = (gchar*) malloc(sizeof(gchar) * strlen(name)); + buffer = (gchar*) malloc(sizeof(gchar) * (strlen(name) + 1)); for(c = name; *c != '\0'; c = next) { next = utf8_next_char(c); |