]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Update crypto/x509/x509_vpm.c
authorBob Beck <beck@obtuse.com>
Thu, 5 Feb 2026 15:37:00 +0000 (08:37 -0700)
committerNeil Horman <nhorman@openssl.org>
Tue, 24 Feb 2026 14:03:39 +0000 (09:03 -0500)
Co-authored-by: Viktor Dukhovni <viktor1ghub@dukhovni.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MergeDate: Tue Feb 24 14:04:30 2026
(Merged from https://github.com/openssl/openssl/pull/29612)

crypto/x509/x509_vpm.c

index c3e4e25fc326e3605680b815efe29f3aa9cc02d5..836800193387db5207d7a787da1d25ab87e79b4e 100644 (file)
@@ -315,7 +315,7 @@ static int validate_email_name(const char *name, size_t len, int rfc822)
         goto err;
 
     /* Go to the last @ */
-    while ((next = memchr(at + 1, '@', len - (at - name - 1))) != NULL)
+    while ((next = memchr(at + 1, '@', len - (at - name + 1))) != NULL)
         at = next;
 
     /* Ensure the local part is not oversize */