diff options
author | Gerald Combs <gerald@wireshark.org> | 2006-01-06 20:03:52 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2006-01-06 20:03:52 +0000 |
commit | 20b00dd58164de1084fd9bb633b3186972411961 (patch) | |
tree | dfd0a3c9882c46b8ae9dae42aff2a91df444b6bb /asn1 | |
parent | deeb41e08bf7645e2619a9aa0a77776431d6d1b0 (diff) |
Don't dereference a null pointer. Fixes bug 651. Update the release notes
accordingly.
svn path=/trunk/; revision=16967
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/h248/packet-h248-template.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index 98cec4e6f1..18da5ffbc0 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -1189,7 +1189,7 @@ static h248_trx_t* h248_trx(h248_msg_t* m ,guint32 t_id , h248_trx_type_t type) if (m->commited) { for ( trxmsg = m->trxs; trxmsg; trxmsg = trxmsg->next) { - if (trxmsg->trx->id == t_id) { + if (trxmsg->trx && trxmsg->trx->id == t_id) { return trxmsg->trx; } } @@ -1390,6 +1390,7 @@ static h248_cmd_t* h248_cmd(h248_msg_t* m, h248_trx_t* t, h248_ctx_t* c, h248_cm cmdctx->last = cmdtrx->last = NULL; if (t->cmds) { + DISSECTOR_ASSERT(t->cmds->last != NULL); t->cmds->last->next = cmdtrx; t->cmds->last = cmdtrx; } else { @@ -1398,6 +1399,7 @@ static h248_cmd_t* h248_cmd(h248_msg_t* m, h248_trx_t* t, h248_ctx_t* c, h248_cm } if (c->cmds) { + DISSECTOR_ASSERT(c->cmds->last != NULL); c->cmds->last->next = cmdctx; c->cmds->last = cmdctx; } else { |