File: 1016_readline.patch

package info (click to toggle)
uwsgi 2.0.28-9
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,968 kB
  • sloc: ansic: 86,892; python: 6,620; cpp: 1,131; java: 708; perl: 646; sh: 588; ruby: 555; makefile: 148; xml: 130; cs: 121; objc: 37; php: 28; erlang: 20; javascript: 11
file content (18 lines) | stat: -rw-r--r-- 698 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Fix limit readline output to buffer size
Author: Juho Heikkinen <juho.heikkinen@f-secure.com>
Bug: https://github.com/unbit/uwsgi/issues/1412
Bug-Debian: https://bugs.debian.org/846362
Last-Update: 2024-09-17
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/core/reader.c
+++ b/core/reader.c
@@ -283,7 +283,7 @@
                 }
 
 	// no line found, let's return all
-        *rlen = wsgi_req->post_readline_size - wsgi_req->post_readline_pos;
+        *rlen = wsgi_req->post_readline_watermark - wsgi_req->post_readline_pos;
         char *buf = wsgi_req->post_readline_buf + wsgi_req->post_readline_pos;
 	wsgi_req->post_readline_pos = 0;
 	return buf;