Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Apr 15, 2016
2 parents 51d7b12 + 58976ee commit 4c0b1c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/assoc_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,9 @@ static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit,
free_slot = i;
continue;
}
if (ops->compare_object(assoc_array_ptr_to_leaf(ptr), index_key)) {
if (assoc_array_ptr_is_leaf(ptr) &&
ops->compare_object(assoc_array_ptr_to_leaf(ptr),
index_key)) {
pr_devel("replace in slot %d\n", i);
edit->leaf_p = &node->slots[i];
edit->dead_leaf = node->slots[i];
Expand Down
2 changes: 1 addition & 1 deletion scripts/asn1_compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ int main(int argc, char **argv)
}

hdr = fopen(headername, "w");
if (!out) {
if (!hdr) {
perror(headername);
exit(1);
}
Expand Down

0 comments on commit 4c0b1c6

Please sign in to comment.