#236 htnotify aborts afer long time and huge memory allocation

open
nobody
httools (7)
5
2004-08-04
2004-08-04
Anonymous
No

Sender : jmvst@wanadoo.fr

System Linux 2.6.3-7mdk-p3-smp-64GB #1 SMP
Mandrake 10.0 standard no update done

htdig : 3.1.6 and 3.2

the problem occurs in htnotify.cc in
readPreAndPostamble function

If the config file doens't contain any "htnotify_prefix_file"
or "htnotify_suffix_file", the two strings prefixfile and
suffixfile contains an empty string and not a NULL string

So, the lines
if (prefixfile != NULL)
and
if (suffiixfile != NULL)

are wrong in this case and it continues opening the files

under Redhat 7.3 htnotify works fine, but not under
Mandrake 10.0. It seems that the ifstream in(suffixfile);
does not return in.bad () and the in.getline loops
endlessly...

IMHO in any case, it should be best to improve string
validation and to test if strlen (prefixfile) is 0
(same thing for suffifile) so that the function doesn't
open nor read the files.

Regards

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks