aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-05-02 19:15:40 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-05-02 19:15:40 +0200
commitf7fc7522f96c98e2edba90261c7c85dcab44d7e1 (patch)
tree43fff47b2bb6c5b671ef7fc604f6535ff7364776
parent9e533614cb1f10d9d3aa470d23ebc9f7b469e621 (diff)
parent735e1195c28a628731d3e31f76d8dc3f8a1b9fe6 (diff)
downloadbootable_recovery-f7fc7522f96c98e2edba90261c7c85dcab44d7e1.zip
bootable_recovery-f7fc7522f96c98e2edba90261c7c85dcab44d7e1.tar.gz
bootable_recovery-f7fc7522f96c98e2edba90261c7c85dcab44d7e1.tar.bz2
Merge branch 'cm-13.0' of https://github.com/LineageOS/android_bootable_recovery into replicant-6.0replicant-6.0-0001
-rw-r--r--ui.cpp8
-rw-r--r--verifier.cpp6
2 files changed, 10 insertions, 4 deletions
diff --git a/ui.cpp b/ui.cpp
index d1eca91..c7268fb 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -444,12 +444,12 @@ void RecoveryUI::ProcessRel(input_device* dev, int code, int value) {
// key event.
dev->rel_sum += value;
if (dev->rel_sum > 3) {
- process_key(dev, KEY_DOWN, 1); // press down key
- process_key(dev, KEY_DOWN, 0); // and release it
+ ProcessKey(dev, KEY_DOWN, 1); // press down key
+ ProcessKey(dev, KEY_DOWN, 0); // and release it
dev->rel_sum = 0;
} else if (dev->rel_sum < -3) {
- process_key(dev, KEY_UP, 1); // press up key
- process_key(dev, KEY_UP, 0); // and release it
+ ProcessKey(dev, KEY_UP, 1); // press up key
+ ProcessKey(dev, KEY_UP, 0); // and release it
dev->rel_sum = 0;
}
}
diff --git a/verifier.cpp b/verifier.cpp
index 61e5adf..bf7071d 100644
--- a/verifier.cpp
+++ b/verifier.cpp
@@ -144,6 +144,12 @@ int verify_file(unsigned char* addr, size_t length,
LOGI("comment is %zu bytes; signature %zu bytes from end\n",
comment_size, signature_start);
+ if (signature_start > comment_size) {
+ LOGE("signature start: %zu is larger than comment size: %zu\n", signature_start,
+ comment_size);
+ return VERIFY_FAILURE;
+ }
+
if (signature_start <= FOOTER_SIZE) {
LOGE("Signature start is in the footer");
return VERIFY_FAILURE;