summaryrefslogtreecommitdiff
path: root/lang/ruby16-base/patches/patch-aj
blob: e285e49a31755550e815a2948fd29ab4844db71e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-aj,v 1.1.1.1 2005/03/06 16:36:08 taca Exp $

--- lib/cgi.rb.orig	2002-08-29 18:05:06.000000000 +0900
+++ lib/cgi.rb
@@ -823,10 +823,13 @@ convert string charset, and set language
           end
 
           c = if bufsize < content_length
-                stdinput.read(bufsize) or ''
+                stdinput.read(bufsize)
               else
-                stdinput.read(content_length) or ''
+                stdinput.read(content_length)
               end
+	  if c.nil?
+	    raise EOFError, "bad content body"
+	  end
           buf += c
           content_length -= c.size