oberthur: Once again, fix the error check
The shared codition was executed but the condition in LOG_TEST_RET was not met in case of the acl was null. Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25962
This commit is contained in:
parent
5eccebb4ee
commit
c8b2e82713
|
@ -306,8 +306,15 @@ sc_oberthur_read_file(struct sc_pkcs15_card *p15card, const char *in_path,
|
||||||
const struct sc_acl_entry *acl = sc_file_get_acl_entry(file, SC_AC_OP_READ);
|
const struct sc_acl_entry *acl = sc_file_get_acl_entry(file, SC_AC_OP_READ);
|
||||||
int ii;
|
int ii;
|
||||||
|
|
||||||
|
if (acl == NULL) {
|
||||||
|
sc_file_free(file);
|
||||||
|
free(*out);
|
||||||
|
*out = NULL;
|
||||||
|
LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
rv = sc_pkcs15_get_objects(p15card, SC_PKCS15_TYPE_AUTH_PIN, objs, 0x10);
|
rv = sc_pkcs15_get_objects(p15card, SC_PKCS15_TYPE_AUTH_PIN, objs, 0x10);
|
||||||
if (rv != SC_SUCCESS || acl == NULL) {
|
if (rv != SC_SUCCESS) {
|
||||||
sc_file_free(file);
|
sc_file_free(file);
|
||||||
free(*out);
|
free(*out);
|
||||||
*out = NULL;
|
*out = NULL;
|
||||||
|
|
Loading…
Reference in New Issue