Ulrich Windl wrote:
> On 28 Jan 2009 at 17:34, Mike Christie wrote:
> 
>>                         strncat(dev_dir, dent->d_name, FILENAMESZ);
> 
> Hi,
> 
> once again: The third argument of strncpy() counts the bytes to be added, not 
> the 
> bytes that are already there, so the code may not do what some of you seem to 
> expect!
> 

Ack,

Copy and paste error, may I suggest to instead just do one snprintf call to 
build the entire path in one go?

That removes all this pain.

Regards,

Hans


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to