[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Bug in apr_dir_make_recursive (was Re: Bug report)

From: Brian W. Fitzpatrick <fitz_at_collab.net>
Date: 2005-06-17 22:47:04 CEST

[cc'ing apr dev list]

On Jun 16, 2005, at 3:01 PM, Brian W. Fitzpatrick wrote:

> On Thu, 2005-06-16 at 15:49 -0400, John Peacock wrote:
>> Leon Koenig wrote:
>>> bash-3.00$ mkdir blah; cd blah; rmdir ../blah
>>> bash-3.00$ svn checkout
>>> Segmentation fault
>> Are you upset that it segfaults or that it doesn't smack you up
>> side the
>> head for deleting the directory out from under yourself? ;-)
>> Following the same steps:
>> $ cp ../something .
>> cp: cannot create regular file `./something': No such file or
>> directory
>> Is that more like what you expected?
> It's what I would expect. This is a bug in apr...
> apr_dir_make_recursive is going into an infinite loop.
> I'm working on this right now.

Patch attached.

APR devs, what say ye?


Log message
Fix bug where an attempt to create a directory at a relative path in a
non-existent CWD would send apr_dir_make_recursive into an infinite
loop (resulting in a segmentation fault).

* file_io/unix/dir.c, file_io/win32/dir.c (apr_dir_make_recursive):
   Return an error in the case of a zero length path.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Fri Jun 17 22:49:17 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.