commit 489c4a540bb2c4744471441425b8932b97a153e7
parent fc79fba0970033d04d847fa2a02f50eec52bc7cd
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 20 Dec 2018 23:02:28 +0100
fix #5494
Diffstat:
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,6 +1,7 @@
Thu Dec 20 22:48:47 CET 2018
Fix #5493: possible out-of-bounds read in libextractor_common
- in case of iconv() failure. -CG
+ in case of iconv() failure.
+ Fix #5494: NULL dereference in OLE2 extractor (for malformed input). -CG
Sun Dec 2 12:05:33 CET 2018
Fix #5488: do not export non-public functions from API. -CG
diff --git a/src/plugins/ole2_extractor.c b/src/plugins/ole2_extractor.c
@@ -173,7 +173,7 @@ struct ProcContext
EXTRACTOR_MetaDataProcessor proc;
/**
- * Closure for 'proc'.
+ * Closure for @e proc.
*/
void *proc_cls;
@@ -213,7 +213,12 @@ process_metadata (gpointer key,
if (G_VALUE_TYPE(gval) == G_TYPE_STRING)
{
- contents = strdup (g_value_get_string (gval));
+ const char *gvals;
+
+ gvals = g_value_get_string (gval);
+ if (NULL == gvals)
+ return;
+ contents = strdup (gvals);
}
else
{