aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hughes <tom@compton.nu>2018-11-02 10:03:12 +0000
committerMichael Mann <mmann78@netscape.net>2018-11-03 17:10:45 +0000
commitd06ad62059bd07b089b1ee268ccd8c0aafccfe4c (patch)
tree1171a210ff177644c11f95ea01529645e1653bd9
parent6910cb138b0d6d2f70177daa03edc85752b7bebf (diff)
IAX: Don't try and copy a non-existent address
Bug: 15251 Change-Id: I47e80ea6271f46731cf391a54ceea61c363b6cf7 Reviewed-on: https://code.wireshark.org/review/30481 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-iax2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index 242d54d666..a36dbeb3a4 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -719,7 +719,8 @@ static guint iax_circuit_lookup(const address *address_p,
new_key->addr.type = address_p->type;
new_key->addr.len = MIN(address_p->len, MAX_ADDRESS);
new_key->addr.data = new_key->address_data;
- memcpy(new_key->address_data, address_p->data, new_key->addr.len);
+ if (new_key->addr.len > 0)
+ memcpy(new_key->address_data, address_p->data, new_key->addr.len);
new_key->ptype = ptype;
new_key->port = port;
new_key->callno = callno;