Hello all,

I found in lib/savedir.h multiple (2) memory leaks for two variables and
some more bugs. But fix is nontrivial and more that 15 lines and the FSF
has no copyright assignment from me. So I let you only know about my
findings, may be I have the time to sign the copyright assignment in the
future but not now:

* path and pathlen are not static
* pathlen is used uninitialized
* path is repeatedly overwritten by the calloc() call
* the 'slash = (path[dirlen] != '/')' line is totaly useless, because dirlen
  points always to the '\0' of the previously strcpy(), so slash is always 1
* if the relloc() of name_space failed, name_space is still a valid pointer

Regards
Bert Wesarg



Reply via email to