[Stgt-devel] [Patch 1/2] Merge lu_phy_attr struct into scsi_lu

Mark Harvey markh794
Sat Jun 16 00:16:17 CEST 2007


On 6/15/07, Bastian Blank <waldi at berlios.de> wrote:
> On Fri, Jun 15, 2007 at 05:55:11PM +1000, Mark Harvey wrote:
> > +     memcpy(lu->attrs.product_id, "OSD", 16);
>
> This code leaks 12 bytes of memory. "OSD" is 4 bytes long and
> nullterminated. The whole thing is undefined behaviour.
>

Darn.. One of these days I'll get this patch generation concept worked out...

This is fixed in [Patch 2/2].. Along with other 'Dynamic Logical Unit
configuration' changes.

I'll re-do the two patches yet again. This time I plan on getting the
right bits in each patch :)

Thanks for pointing this out.

Mark

> Bastian
>
> --
>         "We have the right to survive!"
>         "Not by killing others."
>                 -- Deela and Kirk, "Wink of An Eye", stardate 5710.5
> _______________________________________________
> Stgt-devel mailing list
> Stgt-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/stgt-devel
>



More information about the stgt mailing list