From 48f0ea79f99174fb0a62cb2354e13496ce5b7c44 Mon Sep 17 00:00:00 2001 From: pancake Date: Sun, 17 Apr 2022 00:38:35 +0200 Subject: [PATCH] Fix null deref in ne parser ##crash * Reported by @cnitlrt via huntr.dev * BountyID: d8b6d239-6d7b-4783-b26b-5be848c01aa1/ * Reproducer: nenull --- libr/bin/format/ne/ne.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/bin/format/ne/ne.c b/libr/bin/format/ne/ne.c index d9dc886d2177a..e61ca7049101e 100644 --- a/libr/bin/format/ne/ne.c +++ b/libr/bin/format/ne/ne.c @@ -77,7 +77,7 @@ static char *__func_name_from_ord(const char *module, ut16 ordinal) { RList *r_bin_ne_get_segments(r_bin_ne_obj_t *bin) { int i; - if (!bin) { + if (!bin || !bin->segment_entries) { return NULL; } RList *segments = r_list_newf (free);