dissector: icmpv6: Fix possible null pointer dereferences
commit8b8244232220aef30417b8bc712e45542f5504db
authorTobias Klauser <tklauser@distanz.ch>
Thu, 13 Jun 2013 15:20:18 +0000 (13 17:20 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Thu, 13 Jun 2013 15:20:18 +0000 (13 17:20 +0200)
tree61695b30a446fe47c9ffd2e11eae10b5036a2cf6
parent0cc5ca825656dbb2dc91fb130924abe66c97b254
dissector: icmpv6: Fix possible null pointer dereferences

The Coverity scanner found several possible null pointer dereferences in
the ICMPv6 dissector. These are all related to not checking the return
value of pkt_pull(). Sometimes pkt_pull(()) is called iteratively based
on a length value in the encountered packet, so this could possibly be
hit in case an invalid packet is crafted accordingly.

Fix all by checking the return value of pkt_pull() consistently.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
proto_icmpv6.c