[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] bad request chrashes daemon

From: Sebastian Gerhardt
Subject: [libmicrohttpd] bad request chrashes daemon
Date: Wed, 26 Mar 2008 12:00:39 +0100

Hello MHD developers,

I am not sure whether this is a bug in the library or  
the application bears responsibility for this, but a misbehaving client
is able to chrash the daemon. 
I have tried version 2.2 and 2.3, compiled and ran it on Debian Etch x86
without libcurl.

I can reproduce this with your minimal_example:
1.$ ./minimal_example 8000 50
2.$ telnet localhost 
  >GET / <enter>

`MHD_connection_handle_idle' in state 1
Received malformed line (no colon), closing connection.
`MHD_connection_handle_idle' in state 2
`MHD_connection_handle_idle' in state 2
`MHD_connection_handle_idle' in state 3
segmentation fault

I think this is because the library tries parsing for cookies in the
header. When the function MHD_lookup_connection_value in connection.c is
reached, he does a strcasecmp (key, pos->header) but pos->header is NULL
at this point. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]