https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229713
Bug ID: 229713
Summary: src/crypto/heimdal/appl/push/push.c:270: poor error
handling ?
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: misc
Assignee: [email protected]
Reporter: [email protected]
src/crypto/heimdal/appl/push/push.c:270]: (style) Checking if unsigned variable
'from_line_length' is less than zero.
Source code is
from_line_length = snprintf (from_line, sizeof(from_line),
"From %s %s", "push", ctime(&now));
if (from_line_length < 0 || from_line_length > sizeof(from_line))
errx (1, "snprintf failed");
but variable from_line_length is unsigned and the return value
from snprintf is int.
Suggest sanity check return value from snprintf *before* storing in an unsigned
variable.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"