On Thu, Jul 14, 2011 at 02:02:42PM -0400, Mike Frysinger wrote: > On Thursday, July 14, 2011 09:49:23 Albert ARIBAUD wrote: > > Please use strncpy() which will also guard against overflows. > > or BUG_ON(strlen(name) >= MDIO_NAME_LEN) > -mike
Patch v3 has both. The original code did have a check for the name overflowing but BUG_ON() is IMO clearer so I switched to using it instead. I kept strncpy() in v3, rather than just strcpy(), because it makes the code robust against future edits. Thanks for the feedback. Bye for now, -- Laurence Withers, <[email protected]> http://www.guralp.com/ Direct tel:+447753988197 or tel:+443333408643 Software Engineer General support queries: <[email protected]> CMG-DCM CMG-EAM CMG-NAM _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

