Fix CVE-2014-8767
Backport of 4038f83ebf654804829b258dde5e0a508c1c2003

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>
Fix CVE-2014-8768
Backport of 9255c9b05b0a04b8d89739b3efcb9f393a617fe9

Do 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).

Signed-off-by: Pasi Sjöholm <pasi.sjoholm@jollamobile.com>
Fix CVE-2014-8769
Backported from:
ab4e52b94aac6cb729a5a695aa612d5ebda2ec3a
3e8a443c3671baa37ae7870f08fb9b4bf386fd24
e302ff0e4a6bde6915bee1c89373aa14c823dd60
54d2912c19240a1a1866ba1519889086868038c4
3f5693a2bb783b1caa2a308e64ee34d167f36f05

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770424

fix denial of service and possible code execution

Signed-off-by: Pasi Sjöholm <pasi.sjoholm@jollamobile.com>
Fix CVE-2014-9140
Backport of 0f95d441e4b5d7512cc5c326c8668a120e048eda

Do bounds checking when unescaping PPP.

Clean up a const issue while we're at it.

Signed-off-by: Pasi Sjöholm <pasi.sjoholm@jollamobile.com>
Merge pull request #2 from tigeli/mer-master

Fix CVE-2014-8767, CVE-2014-8768, CVE-2014-8769 and CVE-2014-9140