Index: firmware/lib/cryptolib/rsa.c |
diff --git a/firmware/lib/cryptolib/rsa.c b/firmware/lib/cryptolib/rsa.c |
index adc0dc0513fccd8a386a5cfa3549552d447add34..bad01d835d775c541de5ee1d631288d157aa8757 100644 |
--- a/firmware/lib/cryptolib/rsa.c |
+++ b/firmware/lib/cryptolib/rsa.c |
@@ -134,6 +134,9 @@ int RSAVerify(const RSAPublicKey *key, |
const uint8_t* padding; |
int success = 1; |
+ if (!key || !sig || !hash) |
+ return 0; |
+ |
if (sig_len != (key->len * sizeof(uint32_t))) { |
VBDEBUG(("Signature is of incorrect length!\n")); |
return 0; |