diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c index dc22c697e104..43dd9a47d524 100644 --- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c +++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c @@ -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 == '+') {