projects
/
platform
/
upstream
/
libsmi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
623d25f
)
CVE-2010-2891
author
Anas Nashif
<anas.nashif@intel.com>
Sun, 4 Nov 2012 15:13:21 +0000
(07:13 -0800)
committer
Anas Nashif
<anas.nashif@intel.com>
Sun, 4 Nov 2012 15:13:21 +0000
(07:13 -0800)
lib/smi.c
patch
|
blob
|
history
diff --git
a/lib/smi.c
b/lib/smi.c
index
38fed23
..
e622045
100644
(file)
--- a/
lib/smi.c
+++ b/
lib/smi.c
@@
-1315,10
+1315,15
@@
SmiNode *smiGetNode(SmiModule *smiModulePtr, const char *node)
}
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) {