![]() gcc was warning about strncpy() leaving an unterminated string. In this case, it was correct. The code was doing strncpy()+strncat()+strlen() essentially to determine if the strings have expected length. If the length was correct, a buffer overread was performed (or at least some garbage bytes were used from the uninitialized part of the buffer). Let's do the length check first and then only copy stuff if everything agrees. For some reason the function was called "prepend", when it obviously does an "append". |
||
---|---|---|
.. | ||
README | ||
scsi.h | ||
scsi_id.c | ||
scsi_id.h | ||
scsi_serial.c |
scsi_id - generate a SCSI unique identifier for a given SCSI device Please send questions, comments or patches to <patmans@us.ibm.com> or <linux-hotplug-devel@lists.sourceforge.net>.