Skip to content

openssl_config_int() may return indeterminate value on OPENSSL_SYS_UEFI post 25eb9299cec4 #9026

@lersek

Description

@lersek

(Originally reported by Ard Biesheuvel reports at http://mid.mail-archive.com/20190527205141.12344-1-ard.biesheuvel@linaro.org )

$ git show --function-context --color 25eb9299cec -- crypto/conf/conf_sap.c

The change introduced a local variable called ret. It is not initialized, and when building OpenSSL with OPENSSL_SYS_UEFI defined, then it is never assigned either. However, the return statement at the end of the function reads ret unconditionally. gcc's -Wuninitialized option flags this problem justifiedly, and gcc suggests explicit zero-initialization as part of the variable definition.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions