[PATCH] Fix AppleDouble conversion in vfs_fruit
Jeremy Allison
jra at samba.org
Wed Oct 10 20:32:34 UTC 2018
On Wed, Oct 10, 2018 at 10:27:15PM +0200, Ralph Böhme wrote:
> On Wed, Oct 10, 2018 at 11:20:04AM -0700, Jeremy Allison wrote:
> >
> > In [PATCH 19/21] vfs_fruit: add out arg "converted_xattr" to ad_convert_xattr
> >
> > you have:
> >
> > @@ -1290,12 +1294,13 @@ static int ad_convert(struct adouble *ad,
> > const struct smb_filename *smb_fname)
> > {
> > bool ok;
> > + bool converted_xattr;
> >
> > if (ad_getentrylen(ad, ADEID_FINDERI) == ADEDLEN_FINDERI) {
> > return 0;
> > }
> >
> > - ok = ad_convert_xattr(ad, smb_fname);
> > + ok = ad_convert_xattr(ad, smb_fname, &converted_xattr);
> > if (!ok) {
> > return -1;
> > }
> >
> > I think you should initialize converted_xattr
> > at declaration as:
> >
> > + bool converted_xattr = false;
> >
> > With that change, RB+. Do you want me to make
> > that change and push ?
>
> scaredy-cat band-aid. Pushed with that change. :)))
I'm not disagreeing, but if the code flow changes
in the future you might get a "used uninitialized
variable" error.
Do you want that responsibility ? Well, do you ?
DO YOU !!!! :-) :-).
Thanks,
Jeremy.
More information about the samba-technical
mailing list