[openssl/openssl] ab612a: test/asn1_string_test.c: allocate tmpstring proper...
"'esyr' via openssl-commits" <[email protected]>
| Newsgroups | gmane.comp.encryption.openssl.cvs |
|---|---|
| Message-ID | <openssl/openssl/push/refs/heads/master/[email protected]> |
Branch: refs/heads/master
Home: https://github.com/openssl/openssl
Commit: ab612a9baff64b776d5dc3bd58fdf37c109bf1cc
https://github.com/openssl/openssl/commit/ab612a9baff64b776d5dc3bd58fdf37c109bf1cc
Author: Eugene Syromiatnikov <[email protected]>
Date: 2026-06-28 (Sun, 28 Jun 2026)
Changed paths:
M test/asn1_string_test.c
Log Message:
-----------
test/asn1_string_test.c: allocate tmpstring properly in asn1_string_new_not_owned_test
Since tmpstring's ownership is transferred to tmp in ASN1_STRING_set0(),
it should be allocated using OPENSSL_strdup() and not strdup()
(as it will be freed with OPENSSL_free() in ASN1_STRING_clear_free()).
Also, don't try to free tmpstring on error, as at no point there is a jump
to err when tmpstring is allocated and not owned by tmp.
Reported by Coverity, issue 1695274.
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1695274
Fixes: 68c0321e90d0 "Provide ASN1_STRING_new_not_owned()"
Signed-off-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
MergeDate: Sun Jun 28 16:22:28 2026
(Merged from https://github.com/openssl/openssl/pull/31667)
To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
--
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/e60d94-ab612a%40github.com.