Hi: snprintf is defined to print a maximum number of characters into a string, and guarantees to NIL-terminate the string.
The following patch corrects several situations where a string was defined with 256 characters, but snprintf was called with only 255 characters, meaning that the 256th character would never be reached. Given that the call to snprintf was preceded by bzero (a deprecated method of initializing all of the contents of a given string to NIL), it seems likely that snprintf's NIL-terminating behaviour was overlooked or forgotten about. As bzero is deprecated, this patch removes calls to bzero that are followed by snprintf calls to the same string; the maximum number of characters specified to snprintf has been corrected, as well. I think this is trivial enough not to require a DCO. Let me know if you feel otherwise. -- Dan Scott Laurentian University
oils_mem.patch
Description: Binary data