Stepan Kasal wrote: Hello, On Tue, Sep 21, 2004 at 12:46:32PM -0700, Sorav Bansal wrote: >> My bug-finding tool has discovered malloc-handling bugs in the current >> grep distribution (grep-2.5). >> I am reporting the bugs here. thank you very much for your bug report. I've fixed the problems in the CVS. >> I would be sending along more bugs later if I find them :-) I'm looking forward! Have a nice day, Stepan Kasal Sorav Bansal wrote: Hi, My bug-finding tool has discovered malloc-handling bugs in the current grep distribution (grep-2.5). I am reporting the bugs here. I would be sending along more bugs later if I find them :-) cheers, Sorav Bug #1: ------ dfa.c: 3566 dma->exact = exact dma is not checked against NULL before being dereferenced. Bug #2: ------ dfa.c: 3568 strcpy(dm->must,result) dm->must is not checked against NULL before being passed to strcpy Bug #3: ------ search.c: 238 strcpy (n, match_lines ? line_beg : word_beg); "n" is malloced but not checked against NULL before being passed to strcpy