mirror of
https://github.com/cclassic/model-ghdl
synced 2024-11-29 09:13:28 +01:00
Yet another buffer size fix
This commit is contained in:
parent
fdf04cb659
commit
23a642820e
2
main.c
2
main.c
@ -423,7 +423,7 @@ char* append_string(char **dest, const char *src) {
|
|||||||
*dest[0] = 0;
|
*dest[0] = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*dest = realloc(*dest, (strlen(*dest) + strlen(src)) * sizeof(char));
|
*dest = realloc(*dest, (strlen(*dest) + strlen(src) + 1) * sizeof(char));
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat(*dest, src);
|
strcat(*dest, src);
|
||||||
|
Loading…
Reference in New Issue
Block a user