[Box Backup-dev] COMMIT r302 - in box/trunk: lib/backupclient test/bbackupd

Martin Ebourne boxbackup-dev@fluffy.co.uk
Sat, 07 Jan 2006 00:07:11 +0000


On Fri, 2006-01-06 at 20:45 +0000, Ben Summers wrote:
> > - A very unlikely failure where getxattr returns an error code the  
> > first time
> >   but succeeds the second time could cause buffer overrun and  
> > corruption.
> 
> Would it really? While the error check is desirable, I don't see how  
> it could, given that the size of the buffer is passed to lgetxattr().

Of course, you're right. So the worst that could happen is an attribute
value would get lost on certain platforms. Still, as you say, it's good
practice to always catch error codes, especially in a backup program. :)

Cheers,

Martin.