]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hyper: fix EOF handling on input
authorStefan Eissing <stefan@eissing.org>
Mon, 26 Jun 2023 09:51:43 +0000 (11:51 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 8 Jul 2023 21:01:24 +0000 (23:01 +0200)
We ran out of disc space due to an infinite loop with debug logging

Fixes #11377
Closes #11385
Reported-by: Dan Fandrich
lib/c-hyper.c
tests/data/test1554

index 52e07797c526c70de5c16529a5092a52833fec94..c29983c0b24a6e124ff54c157277c4658067ce84 100644 (file)
@@ -73,8 +73,6 @@ size_t Curl_hyper_recv(void *userp, hyper_context *ctx,
 
   DEBUGF(infof(data, "Curl_hyper_recv(%zu)", buflen));
   result = Curl_read(data, conn->sockfd, (char *)buf, buflen, &nread);
-  if(!result && !nread)
-    result = CURLE_AGAIN;
   if(result == CURLE_AGAIN) {
     /* would block, register interest */
     DEBUGF(infof(data, "Curl_hyper_recv(%zu) -> EAGAIN", buflen));
index 812a2c8c02680624b1171a1caa9e7c991aad3c4b..c16195c17f5cde31f2b043a13742574f3ade7e7b 100644 (file)
@@ -69,12 +69,6 @@ run 1: foobar and so on fun!
 <- Mutex unlock
 -> Mutex lock
 <- Mutex unlock
-%if hyper
--> Mutex lock
-<- Mutex unlock
--> Mutex lock
-<- Mutex unlock
-%endif
 run 1: foobar and so on fun!
 -> Mutex lock
 <- Mutex unlock