diff options
| author | Drew DeVault <sir@cmpwn.com> | 2018-02-11 11:37:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-11 11:37:06 -0500 |
| commit | 4a76d06f33964fee12682a9cd7066d1776c71024 (patch) | |
| tree | 3ae8f4c736c978ec5b9e29cfbcab0de8db058198 /common | |
| parent | a571506d0e3abae0a8fe05a186cb5a33623bdf94 (diff) | |
| parent | aa15629f17d65d45c02c30b6392e74d752b520b3 (diff) | |
Merge pull request #1591 from dlrobertson/fix_mem_errors
Fix memory errors
Diffstat (limited to 'common')
| -rw-r--r-- | common/readline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/readline.c b/common/readline.c index cc40a2cc..d35ba73e 100644 --- a/common/readline.c +++ b/common/readline.c @@ -36,7 +36,7 @@ char *read_line(FILE *file) { } string[length++] = c; } - if (length + 1 == size) { + if (length + 1 >= size) { char *new_string = realloc(string, length + 1); if (!new_string) { free(string); |
