[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#475770: apt-get autoremove segfaults when running as normal user



I think, this has something to do with 'bool pkgDPkgPM::OpenLog()' 
in 'apt-pkg/deb/dpkgpm.cc'.
The result of 'term_out = fopen(logfile_name.c_str(),"a");' is not checked. If 
the logfile is unaccessible the result will be zero and the 
subsequent 'fprintf(term_out, ...);' will segfault.

BTW: maybe 'fprintf(term_out, outstr);' should be 'fprintf(term_out, "%s", 
outstr);'



Reply to: