[openssl/openssl] 9819ba: Don't free aliased pointers in ctx cmp_ctx tests

Neil Horman noreply at github.com
Fri Dec 1 16:16:10 UTC 2023


  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: 9819ba5762aaa1fbdf35e68f1495391bc3e3d43c
      https://github.com/openssl/openssl/commit/9819ba5762aaa1fbdf35e68f1495391bc3e3d43c
  Author: Neil Horman <nhorman at openssl.org>
  Date:   2023-12-01 (Fri, 01 Dec 2023)

  Changed paths:
    M test/cmp_ctx_test.c

  Log Message:
  -----------
  Don't free aliased pointers in ctx cmp_ctx tests

Coverity recorded issues 1551739 and 1551737, a potential double free in the
tests.  It occurs when the DUP operation fails in such a way val3_read is
returned as the same pointer as val2_read.  Ideally it should never
happen, but resetting val3_read to 0 should satisfy coverity that there
is no issue here

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/22800)

(cherry picked from commit c8ca810da9c47d8cb6988fd14e1cb4e20b0877e8)




More information about the openssl-commits mailing list