Skip to content

Commit 4c0b1c6

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull keys bugfixes from James Morris: "Two bugfixes for Keys related code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: ASN.1: fix open failure check on headername assoc_array: don't call compare_object() on a node
2 parents 51d7b12 + 58976ee commit 4c0b1c6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/assoc_array.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,9 @@ static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit,
524524
free_slot = i;
525525
continue;
526526
}
527-
if (ops->compare_object(assoc_array_ptr_to_leaf(ptr), index_key)) {
527+
if (assoc_array_ptr_is_leaf(ptr) &&
528+
ops->compare_object(assoc_array_ptr_to_leaf(ptr),
529+
index_key)) {
528530
pr_devel("replace in slot %d\n", i);
529531
edit->leaf_p = &node->slots[i];
530532
edit->dead_leaf = node->slots[i];

scripts/asn1_compiler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ int main(int argc, char **argv)
650650
}
651651

652652
hdr = fopen(headername, "w");
653-
if (!out) {
653+
if (!hdr) {
654654
perror(headername);
655655
exit(1);
656656
}

0 commit comments

Comments
 (0)