mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-21 15:45:02 +00:00
Get rid of a NULL dereference when oid is too long.
Reviewed by: keramida Approved by: grehan (mentor) MFC after: 1 week
This commit is contained in:
parent
e80dde60e3
commit
1d4961c06f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140818
@ -169,7 +169,8 @@ parse(char *string)
|
||||
u_int kind;
|
||||
|
||||
bufp = buf;
|
||||
snprintf(buf, BUFSIZ, "%s", string);
|
||||
if (snprintf(buf, BUFSIZ, "%s", string) >= BUFSIZ)
|
||||
errx(1, "oid too long: '%s'", string);
|
||||
if ((cp = strchr(string, '=')) != NULL) {
|
||||
*strchr(buf, '=') = '\0';
|
||||
*cp++ = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user