The branch OpenSSL_1_0_1-stable has been updated
       via  f3e01c8d85d98eab502d7aaaa734a1f9f0b8e375 (commit)
      from  19fca4cafc4eafa3fe3562074aab4352bd421eff (commit)


- Log -----------------------------------------------------------------
commit f3e01c8d85d98eab502d7aaaa734a1f9f0b8e375
Author: Kurt Roeckx <k...@roeckx.be>
Date:   Sat Aug 6 19:16:00 2016 +0200

    Fix off by 1 in ASN1_STRING_set()
    
    Reviewed-by: Rich Salz <rs...@openssl.org>
    
    MR: #3176
    (cherry picked from commit a73be798ced572a988d455d961a2387f6eccb549)

-----------------------------------------------------------------------

Summary of changes:
 crypto/asn1/asn1_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c
index 80f5f2b..e63e82a 100644
--- a/crypto/asn1/asn1_lib.c
+++ b/crypto/asn1/asn1_lib.c
@@ -370,7 +370,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, 
int len)
         else
             len = strlen(data);
     }
-    if ((str->length < len) || (str->data == NULL)) {
+    if ((str->length <= len) || (str->data == NULL)) {
         c = str->data;
         if (c == NULL)
             str->data = OPENSSL_malloc(len + 1);
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to