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)
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 */