Fix looking for "UTC" at start of ptr by using strnmp instead of improperly
unrolled equivalent CID: 1347118 MFC after: 1 week Reported by: Coverity Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
0b911c8b6b
commit
3764d53f49
@ -440,8 +440,8 @@ snmp_date2asn_oid(char *str, struct asn_oid *oid)
|
||||
|
||||
/* 'UTC' - optional */
|
||||
ptr = endptr + 1;
|
||||
if (*ptr == 'U' && *(ptr + 1) == 'T' && *(ptr + 1) == 'C')
|
||||
ptr += 3;
|
||||
if (strncmp(ptr, "UTC", strlen("UTC")) == 0)
|
||||
ptr += strlen("UTC");
|
||||
|
||||
/* '+/-' */
|
||||
if (*ptr == '-' || *ptr == '+') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user