On 2013年04月26日 21:09, Bill Pemberton wrote: > Dan Carpenter writes: >> > >> > On Wed, Apr 24, 2013 at 11:18:03AM +0800, Chen Gang wrote: >>> > > >>> > > For dgrp, the buffer length of 'nd->nd_ps_desc' is 'MAX_DESC_LEN + 1', so >>> > > the buffer length of 'getnode.nd_ps_desc' also need be 'MAX_DESC_LEN + 1', >>> > > then can fully copy from 'nd->nd_ps_desc' to 'getnode.nd_ps_desc'. >>> > > >> > >> > This is a user space change so someone needs to check that it >> > doesn't break anything. >> > > The only utility that uses the DIGI_GETNODE ioctl is dparp. The > digi_node struct would need to be changed for it too. dparp isn't > needed to make the device work and dparp isn't even built in the > version of the user space tools I have on github. > OK, thank you for your information. > However, I don't know if folks actually use that utility, so I think > the version of this patch that uses strlcpy is a better way go. In > addition, I think nd_ps_desc in the nd_struct struct should be changed > to MAX_DESC_LEN to avoid this confusion down the road. It sounds well ! Thanks. -- Chen Gang Asianux Corporation _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel