changeset 724:4322541b80ed

Tests: avoid uninitialized warnings in h2.t with partial frame.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 30 Sep 2015 17:54:12 +0300
parents bc4d6e2bd031
children e5b1495299bd
files h2.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h2.t
+++ b/h2.t
@@ -2208,7 +2208,7 @@ sub h2_read {
 		$stream = unpack("N", pack("B32", $stream));
 
 		$buf = raw_read($s, $buf, $length + 9);
-		last unless length $buf;
+		last if length($buf) < $length + 9;
 
 		$buf = substr($buf, 9);