-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid passing null for asprintf strings
It is undefined behavior to pass null to a printf function for a %.*s substitution, even if the accompanying length is zero. OpenBSD generates syslog warnings from libc when it sees a null pointer in a string substitution (reported by Nathanael Rensen). krb5_sname_to_principal() passes a null pointer in the usual case where there is no port trailer. Address this case and others where we use asprintf() with %.*s substitutions and might pass null, either by avoiding the use of asprintf() or by ensuring that the pointer isn't null. ticket: 9047 (new)
- Loading branch information
1 parent
d4359c6
commit b6a29fe
Showing
4 changed files
with
26 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters