From 4be88234ba30ebdd095b24affb4952fbee752899 Mon Sep 17 00:00:00 2001
From: Pascal Quantin <pascal.quantin@gmail.com>
Date: Mon, 20 Jul 2015 19:03:59 +0200
Subject: [PATCH 3/4] Protect dissector_get_(default_)string_handle() against
 NULL input string

Conflicts:
	epan/packet.c

Bug: 11381
Change-Id: Ib102a23b3d840144757ce692312ff13009c5c95e
Reviewed-on: https://code.wireshark.org/review/9717
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
(cherry picked from commit eb1ccbdccde89701f255f921d88992878057477d)
Reviewed-on: https://code.wireshark.org/review/9721
(cherry picked from commit 5470a4dd6230bb9fc4ab7a2c609c97dcf61f2017)
Reviewed-on: https://code.wireshark.org/review/10584
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Reviewed-on: https://code.wireshark.org/review/11258
---
 epan/packet.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/epan/packet.c b/epan/packet.c
index 9cd70ef..5a1826f 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1226,6 +1226,7 @@ dissector_get_string_handle(dissector_table_t sub_dissectors,
 {
 	dtbl_entry_t *dtbl_entry;
 
+	if (!string) return NULL;
 	dtbl_entry = find_string_dtbl_entry(sub_dissectors, string);
 	if (dtbl_entry != NULL)
 		return dtbl_entry->current;
-- 
2.1.4

