Fix #240: Corrupted HTTP response crashes SIPE
commit9df2685b2e047e14ab45e045d11d7310f80b8df0
authorStefan Becker <chemobejk@gmail.com>
Tue, 15 Apr 2014 17:02:48 +0000 (15 20:02 +0300)
committerStefan Becker <chemobejk@gmail.com>
Tue, 15 Apr 2014 17:02:48 +0000 (15 20:02 +0300)
treec4bf5fb8cd1373cdd37810301eb6e1dc64298769
parent7b610e5795c343652a26e26a352cd4369c817967
Fix #240: Corrupted HTTP response crashes SIPE

A HTTP response with a body but without Content-Length header caused
SIPE to parse the body contents as next HTTP response. This somehow led
to a crash.

sipmsg.c will now set a special error response code instead of just
complaining about the corrupted message. The caller can now decide on
the correct course of action.

As this removed SIPE_DEBUG_LEVEL_FATAL usage from sipmsg.c and therefore
the only usage of this level, it has now been completely removed from
the core and backend code.

Also made sure that the SIP & HTTP input routines abort parsing the
buffer once the connection has been closed.
src/api/sipe-backend.h
src/core/sip-transport.c
src/core/sipe-http-transport.c
src/core/sipmsg.c
src/core/sipmsg.h
src/purple/purple-debug.c
src/telepathy/telepathy-debug.c