
On Mon, Apr 25, 2005 at 09:54:13AM -0400, Allen McIntosh wrote:
To trigger problem: smidump --format=mosy CISCO-IETF-FRR-CAPABILITY.my
File CISCO-IETF-FRR-CAPABILITY.my attached. Cisco does not provide a copy of the CISCO-IETF-FRR-MIB referenced in CISCO-IETF-FRR-CAPABILITY.my. Segmentation fault is a bit cryptic as a diagnostic, though :-).
Below is a patch which seems to cure the problem.
/js
Index: smi.c =================================================================== --- smi.c (revision 2127) +++ smi.c (working copy) @@ -994,9 +994,9 @@ nodePtr = nodePtr->nextPtr; } else { for (nodePtr = nodePtr->parentPtr; - (nodePtr->parentPtr) && (!nodePtr->nextPtr); + nodePtr && (nodePtr->parentPtr) && (!nodePtr->nextPtr); nodePtr = nodePtr->parentPtr); - nodePtr = nodePtr->nextPtr; + if (nodePtr) nodePtr = nodePtr->nextPtr; } } while (nodePtr);
@@ -1081,6 +1081,9 @@ }
nodePtr = nodePtr->parentPtr; + if (! nodePtr) { + return NULL; + }
/* * First, try to find a definition in the same module.