diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-14 21:03:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-14 21:03:29 -0400 |
commit | 4c0b1c67c6250be73cedeac935b860e09de4420f (patch) | |
tree | dde83a92187b506a3f88b2e05568884d01cc339a | |
parent | 51d7b120418e99d6b3bf8df9eb3cc31e8171dee4 (diff) | |
parent | 58976eef9dc0318ef87bb81a6303b69d941d04bc (diff) |
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
-rw-r--r-- | lib/assoc_array.c | 4 | ||||
-rw-r--r-- | scripts/asn1_compiler.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/assoc_array.c b/lib/assoc_array.c index 03dd576e6773..59fd7c0b119c 100644 --- a/lib/assoc_array.c +++ b/lib/assoc_array.c | |||
@@ -524,7 +524,9 @@ static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, | |||
524 | free_slot = i; | 524 | free_slot = i; |
525 | continue; | 525 | continue; |
526 | } | 526 | } |
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)) { | ||
528 | pr_devel("replace in slot %d\n", i); | 530 | pr_devel("replace in slot %d\n", i); |
529 | edit->leaf_p = &node->slots[i]; | 531 | edit->leaf_p = &node->slots[i]; |
530 | edit->dead_leaf = node->slots[i]; | 532 | edit->dead_leaf = node->slots[i]; |
diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c index e000f44e37b8..c1b7ef3e24c1 100644 --- a/scripts/asn1_compiler.c +++ b/scripts/asn1_compiler.c | |||
@@ -650,7 +650,7 @@ int main(int argc, char **argv) | |||
650 | } | 650 | } |
651 | 651 | ||
652 | hdr = fopen(headername, "w"); | 652 | hdr = fopen(headername, "w"); |
653 | if (!out) { | 653 | if (!hdr) { |
654 | perror(headername); | 654 | perror(headername); |
655 | exit(1); | 655 | exit(1); |
656 | } | 656 | } |