From: Jens Steube Date: Thu, 14 Jan 2016 19:30:38 +0000 (+0100) Subject: Fixed some heap buffer overflow X-Git-Tag: v3.00-beta~510 X-Git-Url: https://www.flypig.org.uk/git/?a=commitdiff_plain;h=7bfee268d41a484c37e9f194f9a4db9817b15f21;p=hashcat.git Fixed some heap buffer overflow --- diff --git a/src/Makefile b/src/Makefile index c1242a6..e4f8ae9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/oclHashcat.c b/src/oclHashcat.c index 327ffbc..d1c0603 100644 --- a/src/oclHashcat.c +++ b/src/oclHashcat.c @@ -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;