about summary refs log tree commit diff stats
path: root/src/loader
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-13 00:23:02 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-13 00:23:02 +0100
commit73909b09756a3ae2c987b3ef05d02b49c4f37eaa (patch)
treeabe89ee2a3ee2c9d415024ed01e76691197653df /src/loader
parent64e6debefbc2ab00735b83ae1def168775006844 (diff)
downloadchawan-73909b09756a3ae2c987b3ef05d02b49c4f37eaa.tar.gz
loader: fix nil deref in parseHeaders
Diffstat (limited to 'src/loader')
-rw-r--r--src/loader/cgi.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/loader/cgi.nim b/src/loader/cgi.nim
index e621f4f3..5bc22b6a 100644
--- a/src/loader/cgi.nim
+++ b/src/loader/cgi.nim
@@ -286,7 +286,7 @@ proc parseHeaders*(handle: LoaderHandle; buffer: LoaderBuffer): int =
       s &= c
   if s != "":
     parser.lineBuffer = s
-  return buffer.len
+  return L
 
 proc finishParse*(handle: LoaderHandle) =
   discard handle.parseHeaders(nil)
'n141' href='#n141'>141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156