diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-12-20 23:02:28 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-12-20 23:02:28 +0100 |
commit | 489c4a540bb2c4744471441425b8932b97a153e7 (patch) | |
tree | c9d445bc4c9ac86f67678e6bc3b8830dc99e3696 | |
parent | fc79fba0970033d04d847fa2a02f50eec52bc7cd (diff) | |
download | libextractor-489c4a540bb2c4744471441425b8932b97a153e7.tar.gz libextractor-489c4a540bb2c4744471441425b8932b97a153e7.zip |
fix #5494
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/plugins/ole2_extractor.c | 9 |
2 files changed, 9 insertions, 3 deletions
@@ -1,6 +1,7 @@ | |||
1 | Thu Dec 20 22:48:47 CET 2018 | 1 | Thu Dec 20 22:48:47 CET 2018 |
2 | Fix #5493: possible out-of-bounds read in libextractor_common | 2 | Fix #5493: possible out-of-bounds read in libextractor_common |
3 | in case of iconv() failure. -CG | 3 | in case of iconv() failure. |
4 | Fix #5494: NULL dereference in OLE2 extractor (for malformed input). -CG | ||
4 | 5 | ||
5 | Sun Dec 2 12:05:33 CET 2018 | 6 | Sun Dec 2 12:05:33 CET 2018 |
6 | Fix #5488: do not export non-public functions from API. -CG | 7 | 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 index 53fa1b9..a48b726 100644 --- a/src/plugins/ole2_extractor.c +++ b/src/plugins/ole2_extractor.c | |||
@@ -173,7 +173,7 @@ struct ProcContext | |||
173 | EXTRACTOR_MetaDataProcessor proc; | 173 | EXTRACTOR_MetaDataProcessor proc; |
174 | 174 | ||
175 | /** | 175 | /** |
176 | * Closure for 'proc'. | 176 | * Closure for @e proc. |
177 | */ | 177 | */ |
178 | void *proc_cls; | 178 | void *proc_cls; |
179 | 179 | ||
@@ -213,7 +213,12 @@ process_metadata (gpointer key, | |||
213 | 213 | ||
214 | if (G_VALUE_TYPE(gval) == G_TYPE_STRING) | 214 | if (G_VALUE_TYPE(gval) == G_TYPE_STRING) |
215 | { | 215 | { |
216 | contents = strdup (g_value_get_string (gval)); | 216 | const char *gvals; |
217 | |||
218 | gvals = g_value_get_string (gval); | ||
219 | if (NULL == gvals) | ||
220 | return; | ||
221 | contents = strdup (gvals); | ||
217 | } | 222 | } |
218 | else | 223 | else |
219 | { | 224 | { |