diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-02-28 13:44:01 +0000 |
---|---|---|
committer | Carsten Leonhardt <leo@debian.org> | 2019-07-11 00:13:59 +0200 |
commit | 2e71b691afdb270a5555487baae0b5998663399f (patch) | |
tree | 0cff3710a965516a1d44d6a7a7418a8c5fd2c609 | |
parent | b1c145fac0dfd1e336db202a9978f18345678b91 (diff) |
Bugfix
Origin: https://github.com/graygnuorg/pound/commit/c5a95780e2233a05ab3fb8b4eb8a9550f0c3b53c
* http.c: Stop if BIO_read returns <= 0
Gbp-Pq: Name 0005-bugfix-BIO_read
-rw-r--r-- | http.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -143,7 +143,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; @@ -170,7 +170,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; @@ -178,7 +178,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; |