Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, for more info) to build successfully.

Commit f38adc13 authored by Rob Swindell's avatar Rob Swindell 💬

Fix NULL pointer dereference in read_post_data()

What took down cvs/sbbs yesterday:
Program terminated with signal SIGSEGV, Segmentation fault.
6203                    session->req.post_data[session->req.post_len]=0;
[Current thread is 1 (Thread 0x7f2b989ff700 (LWP 17031))]
(gdb) print post_len
No symbol "post_len" in current context.
(gdb) print session->req.post_len
$1 = 0
(gdb) print session->req.post_data
$2 = 0x0
parent ff7c73d8
Pipeline #2383 passed with stage
in 9 minutes and 33 seconds
......@@ -6200,7 +6200,8 @@ int read_post_data(http_session_t * session)
lprintf(LOG_DEBUG,"%04d !ERROR Browser said they sent %lu bytes, but I got %lu",session->socket, (ulong)s, (ulong)session->req.post_len);
if(session->req.post_len > s)
session->req.post_len = s;
if(session->req.post_data != NULL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment