6b8a30762b
Reviewed ok - Thanks OBS-URL: https://build.opensuse.org/request/show/52799 OBS-URL: https://build.opensuse.org/package/show/network:utilities/libsmi?expand=0&rev=6
22 lines
589 B
Diff
22 lines
589 B
Diff
Index: lib/smi.c
|
|
===================================================================
|
|
--- lib/smi.c (revision 29144)
|
|
+++ lib/smi.c (working copy)
|
|
@@ -1793,10 +1793,15 @@
|
|
}
|
|
|
|
if (isdigit((int)node2[0])) {
|
|
- for (oidlen = 0, p = strtok(node2, ". "); p;
|
|
+ for (oidlen = 0, p = strtok(node2, ". ");
|
|
+ p && oidlen < sizeof(oid)/sizeof(oid[0]);
|
|
oidlen++, p = strtok(NULL, ". ")) {
|
|
oid[oidlen] = strtoul(p, NULL, 0);
|
|
}
|
|
+ if (p) {
|
|
+ /* the numeric OID is too long */
|
|
+ return NULL;
|
|
+ }
|
|
nodePtr = getNode(oidlen, oid);
|
|
if (nodePtr) {
|
|
if (modulePtr) {
|