# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1220457988 25200
# Node ID 9545053d336e7406c7743bb019fe871031a9c847
# Parent 45e061426afe4553f78d23dcf3d1b542e1794742
[CU] Fix handling of invalid class in mof parser
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 45e061426afe -r 9545053d336e eo_util_parser.y
--- a/eo_util_parser.y Fri Aug 29 09:34:07 2008 -0700
+++ b/eo_util_parser.y Wed Sep 03 09:06:28 2008 -0700
@@ -23,6 +23,7 @@
#define RC_OK 0
#define RC_EOF EOF
+#define RC_INVALID_CLASS -1000
/* DEFINE ANY GLOBAL VARS HERE */
static const CMPIBroker * _BROKER;
@@ -76,6 +77,8 @@
*_INSTANCE = CMNewInstance(_BROKER,
op,
NULL);
+ if (*_INSTANCE == NULL)
+ return RC_INVALID_CLASS;
free($3);
}
properties '}' ';'