From 4baec2592c243b5f881598b150f9e907f7aa4069 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 7 Mar 2024 04:09:42 +0100 Subject: handle -1 length reads properly --- opentracker.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index a5ba7d3..be169be 100644 --- a/opentracker.c +++ b/opentracker.c @@ -177,6 +177,9 @@ static void handle_read( const int64 sock, struct ot_workstruct *ws ) { return; } + if( byte_count == -1) + return; + /* If we get the whole request in one packet, handle it without copying */ if( !array_start( &cookie->request ) ) { if( ( ws->header_size = header_complete( ws->inbuf, byte_count ) ) ) { -- cgit v1.2.3