Fix CVE-2014-8767

Do more bounds checking and length checking.

Don't run past the end of the captured data, and don't run past the end
of the packet (i.e., don't make the length variable go negative).

Also, stop dissecting if the message length isn't valid.

Signed-off-by: Pasi Sjöholm <pasi.sjoholm@jollamobile.com>