Skip to content
Snippets Groups Projects
Commit 285e7564 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

mem: fix buffer overflow

parent 4988209b
No related branches found
No related tags found
No related merge requests found
......@@ -146,7 +146,7 @@ char *strstrip(const char *str)
len -= 1;
}
char *trimmed = malloc(len);
char *trimmed = malloc(len + 1);
if (!trimmed) {
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment