diff options
Diffstat (limited to '')
-rw-r--r-- | indep.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -104,6 +104,8 @@ allocStr(const char *s, int len) return NULL; if (len < 0) len = strlen(s); + if (len < 0 || len >= STR_SIZE_MAX) + len = STR_SIZE_MAX - 1; ptr = NewAtom_N(char, len + 1); if (ptr == NULL) { fprintf(stderr, "fm: Can't allocate string. Give me more memory!\n"); |