[PATCH] libnl: don't use out-of-scope buffer

Thomas Haller thaller at redhat.com
Tue Nov 24 04:46:49 PST 2015


On Mon, 2015-11-23 at 20:06 +0300, Andrey Vagin wrote:
> 2015-11-23 18:36 GMT+03:00 Thomas Haller <thaller at redhat.com>:
> > On Mon, 2015-11-23 at 17:31 +0300, Andrey Vagin wrote:
> > > From: Andrew Vagin <avagin at virtuozzo.com>
> > > 
> > > The control message buffer is desclared in the if body
> > > and then this buffer is used outside.
> > > 
> > > Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
> > 
> > Hi Andrew,
> > 
> > 
> > Thanks for spotting this and for the patch.
> > 
> > But can we not just declare "buf" at the outer scope
> > of the function?
> 
> Sure, we can. The patch is attached.
> 

Thank you.


applied: https://github.com/thom311/libnl/commit/7bbd09d9410f5fc0d22f00db26306234a50217a2


Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20151124/b93ecedc/attachment.sig>


More information about the libnl mailing list