Fixed some heap buffer overflow

pull/132/head
Jens Steube 8 years ago
parent 245301c9b4
commit 7bfee268d4

@ -77,7 +77,7 @@ NOW := $(shell date +%s)
##
CFLAGS := -O2 -s -pipe -W -Wall -std=c99 -Iinclude/
#CFLAGS := -g -pipe -W -Wall -std=c99 -Iinclude/
#CFLAGS := -g -ggdb -pipe -W -Wall -std=c99 -Iinclude/ -fsanitize=address
##
## Native compilation target

@ -1729,7 +1729,7 @@ static uint count_lines (FILE *fd)
{
uint cnt = 0;
char *buf = (char *) mymalloc (BUFSIZ);
char *buf = (char *) mymalloc (BUFSIZ + 1);
size_t nread_tmp = 0;

Loading…
Cancel
Save