[Privoxy-commits] [privoxy] 11/26: OpenSSL ssl_base64_encode(): Fix buffer size check
    User Git 
    git at git.privoxy.org
       
    Mon Jan 18 13:32:19 UTC 2021
    
    
  
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit f5c1b608535aab58c97bf9623c08b479bc6dcf49
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Thu Jan 14 11:58:12 2021 +0100
    OpenSSL ssl_base64_encode(): Fix buffer size check
    
    In practice it didn't matter because Privoxy always
    provides a sufficiently-sized buffer.
---
 openssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openssl.c b/openssl.c
index 73aadebf..fe4da8fd 100644
--- a/openssl.c
+++ b/openssl.c
@@ -1287,7 +1287,7 @@ extern int ssl_base64_encode(unsigned char *dst, size_t dlen, size_t *olen,
                              const unsigned char *src, size_t slen)
 {
    *olen = 4 * ((slen/3)  + ((slen%3) ? 1 : 0)) + 1;
-   if (*olen < dlen)
+   if (*olen > dlen)
    {
       return ENOBUFS;
    }
-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
    
    
More information about the Privoxy-commits
mailing list