From 339131d835d948ce01512986573c7c2852477d5c Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Thu, 25 Feb 2010 19:28:58 +0000 Subject: Prevent potential crash in libsmi. From: Vincent Bernat svn path=/trunk/; revision=32006 --- epan/oids.c | 12 ++++++++++++ tools/asn2wrs.py | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/epan/oids.c b/epan/oids.c index d59a73aa3e..6501cba7e7 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -587,6 +587,18 @@ static void register_mibs(void) { D(3,("\tModule: %s", smiModule->name)); + /* TODO: Check libsmi version at compile time and disable this + * workaround for libsmi versions where this problem is fixed. + * Currently there is no such version. :-( + */ + if (smiModule->conformance <= 1) + report_failure("Stopped processing module %s due to " + "error(s) to prevent potential crash in libsmi.\n" + "Module's conformance level: %d.\n" + "See details at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560325\n", + smiModule->name, smiModule->conformance); + continue; + for (smiNode = smiGetFirstNode(smiModule, SMI_NODEKIND_ANY); smiNode; smiNode = smiGetNextNode(smiNode, SMI_NODEKIND_ANY)) { diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index c7b45926d6..e52a91bda8 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -47,8 +47,8 @@ import time import getopt import traceback -import lex -import yacc +from ply import lex +from ply import yacc # OID name -> number conversion table oid_names = { -- cgit v1.2.1