Red Hat Bugzilla – Bug 158743
tar-1.14-err.patch causes SEGV
Last modified: 2007-11-30 17:11:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
Description of problem:
Attempting to create a listed-incremental archive of a directory hierarchy containing a directory without read permission (and at least one other sibling file/ directory) causes a SEGV due to uninitialised memory while sorting.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
As a non-superuser:
% umask 077
% mkdir mydir
% mkdir mydir/noreaddir
% chmod u-r mydir/noreaddir
% touch mydir/file
% tar -cf mydir.tar -g mydir.listed mydir
This is caused by tar-1.14-err.patch---which AFAICT serves no useful purpose anyway (nor would it under later versions up to and including the current 1.15.1) because the function in question (scan_path) already handles the case of dirp being NULL (and then correctly terminates the obstack frame).
I suggest this patch be entirely removed.
I can not reproduce it. But when I look into code it seems to me you are right.
I got it. x86_64