[openssl/openssl] a5a353: Fix incomplete check on CMS_SharedInfo_encode

Niels Dossche noreply at github.com
Wed Feb 8 16:00:29 UTC 2023


  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: a5a3532ab0e330351861bb2e00619ec455f3d414
      https://github.com/openssl/openssl/commit/a5a3532ab0e330351861bb2e00619ec455f3d414
  Author: ndossche <niels.dossche at ugent.be>
  Date:   2023-02-08 (Wed, 08 Feb 2023)

  Changed paths:
    M crypto/cms/cms_ec.c

  Log Message:
  -----------
  Fix incomplete check on CMS_SharedInfo_encode

CMS_SharedInfo_encode() can also return a negative error value, but this
is not checked in the current check, only the zero error return value is
covered. A previous PR [1] fixed the other caller's check of
CMS_SharedInfo_encode in this file, but it seems like this place was
missed. Fix it by changing the check to <= 0.

[1] https://github.com/openssl/openssl/pull/12628/commits/a752fc4da5e1dfd5b3a730d95272c2e2b0c48f1a

CLA: trivial

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20181)

(cherry picked from commit ba061818e9d76f332e8914dfe9168577b2378dde)




More information about the openssl-commits mailing list