Fix improper S3 signing key null check (HDFFV-11015).

This commit is contained in:
Jacob Smith 2020-02-07 13:47:15 -06:00
parent 021740bac0
commit 6a93d1f834

View File

@ -1202,7 +1202,7 @@ H5FD_s3comms_s3r_open(const char *url,
if ((region != NULL && *region != '\0') ||
(id != NULL && *id != '\0') ||
(signing_key != NULL && *signing_key != '\0'))
(signing_key != NULL))
{
/* if one exists, all three must exist
*/
@ -1214,7 +1214,7 @@ H5FD_s3comms_s3r_open(const char *url,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
"secret id cannot be null.\n");
}
if (signing_key == NULL || signing_key[0] == '\0') {
if (signing_key == NULL) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
"signing key cannot be null.\n");
}