diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2024-03-07 04:09:42 +0100 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2024-03-07 04:09:42 +0100 |
commit | 4baec2592c243b5f881598b150f9e907f7aa4069 (patch) | |
tree | cc3a07d3755cc08ccc67387bf5af58da79f5cc57 /opentracker.c | |
parent | 110868ec4ebe60521d5a4ced63feca6a1cf0aa2a (diff) |
handle -1 length reads properly
Diffstat (limited to 'opentracker.c')
-rw-r--r-- | opentracker.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 ) { | |||
177 | return; | 177 | return; |
178 | } | 178 | } |
179 | 179 | ||
180 | if( byte_count == -1) | ||
181 | return; | ||
182 | |||
180 | /* If we get the whole request in one packet, handle it without copying */ | 183 | /* If we get the whole request in one packet, handle it without copying */ |
181 | if( !array_start( &cookie->request ) ) { | 184 | if( !array_start( &cookie->request ) ) { |
182 | if( ( ws->header_size = header_complete( ws->inbuf, byte_count ) ) ) { | 185 | if( ( ws->header_size = header_complete( ws->inbuf, byte_count ) ) ) { |