aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-08-05 12:19:02 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2017-08-05 10:39:37 +0000
commit15c0c8db5e0aac50e44eb3e2cd6eb5c0b3585220 (patch)
tree85cc631425ce0b3e836e076c7cffe41dca23764d /epan
parent4b4ce9fb35a46447796252cbfd1af4ea6b889d55 (diff)
Lua: Check for PseudoHeader.none
Don't dereference pointer when using PseudoHeader.none. Bug: 13944 Change-Id: I4e509269ac4983531912f3f9b2cc6b7cf00fbeae Reviewed-on: https://code.wireshark.org/review/22945 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan')
-rw-r--r--epan/wslua/wslua_dumper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/wslua/wslua_dumper.c b/epan/wslua/wslua_dumper.c
index 2aa8618f29..23f7daee77 100644
--- a/epan/wslua/wslua_dumper.c
+++ b/epan/wslua/wslua_dumper.c
@@ -331,7 +331,9 @@ WSLUA_METHOD Dumper_dump(lua_State* L) {
pkthdr.len = ba->len;
pkthdr.caplen = ba->len;
pkthdr.pkt_encap = DUMPER_ENCAP(d);
- pkthdr.pseudo_header = *ph->wph;
+ if (ph->wph) {
+ pkthdr.pseudo_header = *ph->wph;
+ }
/* TODO: Can we get access to pinfo->pkt_comment here somehow? We
* should be copying it to pkthdr.opt_comment if we can. */