mirror of
https://git.freebsd.org/ports.git
synced 2025-06-20 04:00:41 -04:00
newish OpenSSL versions [*] - Add a handful of useful patches from upstream SRPM - Use upstream program description for COMMENT (shorter) - Utilize its own installation target and only post-install documentation files; install sample configuration file - Consummate conversion to option helpers and transfer maintainership to the new volunteer PR: 234556 [*]
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From c5a95780e2233a05ab3fb8b4eb8a9550f0c3b53c Mon Sep 17 00:00:00 2001
|
|
From: Sergey Poznyakoff <gray@gnu.org>
|
|
Date: Mon, 19 Mar 2018 18:11:59 +0200
|
|
Subject: [PATCH] Bugfix
|
|
|
|
* http.c: Stop if BIO_read returns <= 0
|
|
---
|
|
http.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/http.c b/http.c
|
|
index 496a84e..c461489 100644
|
|
--- a/http.c
|
|
+++ b/http.c
|
|
@@ -142,7 +142,7 @@ get_line(BIO *const in, char *const buf, const int bufsize)
|
|
if(tmp != '\n') {
|
|
/* we have CR not followed by NL */
|
|
do {
|
|
- if(BIO_read(in, &tmp, 1) < 0)
|
|
+ if(BIO_read(in, &tmp, 1) <= 0)
|
|
return 1;
|
|
} while(tmp != '\n');
|
|
return 1;
|
|
@@ -169,7 +169,7 @@ get_line(BIO *const in, char *const buf, const int bufsize)
|
|
|
|
/* all other control characters cause an error */
|
|
do {
|
|
- if(BIO_read(in, &tmp, 1) < 0)
|
|
+ if(BIO_read(in, &tmp, 1) <= 0)
|
|
return 1;
|
|
} while(tmp != '\n');
|
|
return 1;
|
|
@@ -177,7 +177,7 @@ get_line(BIO *const in, char *const buf, const int bufsize)
|
|
|
|
/* line too long */
|
|
do {
|
|
- if(BIO_read(in, &tmp, 1) < 0)
|
|
+ if(BIO_read(in, &tmp, 1) <= 0)
|
|
return 1;
|
|
} while(tmp != '\n');
|
|
return 1;
|