[openssl/openssl] 0ee595: Test EVP_PKEY_get_size for zero return

"'Neil Horman' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/openssl-4.0/[email protected]>
  Branch: refs/heads/openssl-4.0
  Home:   https://github.com/openssl/openssl
  Commit: 0ee595cce78c6412abef94d3c761dae53505af85
      https://github.com/openssl/openssl/commit/0ee595cce78c6412abef94d3c761dae53505af85
  Author: Neil Horman <[email protected]>
  Date:   2026-08-13 (Thu, 13 Aug 2026)

  Changed paths:
    M test/evp_extra_test.c

  Log Message:
  -----------
  Test EVP_PKEY_get_size for zero return

The test_rsasve_degenerate_ciphertext calls EVP_PKEY_get_size and uses
that returned value as an array index (offset by -1), but fails to check
if the returned size is greater than zero (which can be returned in an
error case), leading to an array index underflow.

Ensure that the returned value is greater than zero

Fixes https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1699973

Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
MergeDate: Thu Aug 13 11:54:49 2026
(Merged from https://github.com/openssl/openssl/pull/32309)

(cherry picked from commit 05103ee62c17dfe7de61af2ec91130527643678a)



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/openssl-4.0/5d4111-0ee595%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.