Details
-
Task
-
Resolution: Fixed
-
Minor
-
None
-
None
-
9223372036854775807
Description
There are a few locations where the return value of snprintf() is being used and not checked against the maximum number of characters in the buffer.
scnprintf() is nearly identical to snprintf() except the return value for scnprintf() is the number of characters written to the buffer (not including the terminating null).
Where as snprintf() returns the number of characters that would have been written to the buffer, if there was no restriction. Alternatively stated the return value is the size of buffer needed to hold the complete result (not including the terminating null).
Add scnprintf() wrapper around snprintf() and start using it.
Attachments
Issue Links
- is related to
-
LU-9325 Improve lustre kernel string handling
- Resolved