Re: [AD] Some points about the grabber |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Allegro Developers list <conductors@xxxxxxxxxx>
- Subject: Re: [AD] Some points about the grabber
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Sat, 13 Apr 2002 16:12:16 +0200
- Organization: University of Amsterdam
On Friday 12 April 2002 13:34, Peter Wang wrote:
> On 2002-04-12, Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:
> > > > Ok, this turned out to be less tricky and time consuming than I
> > > > had thought. I made a modification that checks if the target file,
> > > > if it exists, is a symlink. If it is, it asks wether to overwrite
> > > > the link or the file it points to.
> > >
> > > I'm ok with this feature. What do you think about it, Peter ?
> >
> > Hmm... wouldn't it be simpler to always follow the symlinks ?
>
> I think this is the safer approach. Whether other programs should be
> considered broken, I don't know.
>
> If you're going to commit, the patch could possibly use
> fix_filename_path instead of realpath.
The grabber already does a fix_filename_path when opening the file, and
looking at the source for fix_filename_path, I don't think it'll expand a
symlink - then again, I haven't tried either.
> And there's some minor formatting and potential buffer overflows.
I thought I'd looked up the Allegro source formatting requirements... what
did I miss?
I don't think I introduced really more potential buffer overflows than
were already there (though I think I read in the man page that realpath
itself can cause some problems).
I'm ok to modify my original patch and submit a new one, btw.