[PATCH] libkmod-signature: pkcs#7: fix crash when signer info is not present.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reported-by: Kazuya Saito <saito.kazuya@xxxxxxxxxxxxxx>
Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
---
 libkmod/libkmod-signature.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
index fae074e6dd1d..782e96f69fef 100644
--- a/libkmod/libkmod-signature.c
+++ b/libkmod/libkmod-signature.c
@@ -166,7 +166,7 @@ kmod_module_signature_info_pkcs7(const char *mem,
 	sig_info->key_id_len = cert->key_id_size;
 
 	sig_info->signer = cert->signer;
-	sig_info->signer_len = strlen(cert->signer);
+	sig_info->signer_len = cert->signer ? strlen(cert->signer) : 0;
 
 	sig_info->algo = NULL;
 	sig_info->hash_algo = cert->hash_algo;
-- 
2.13.6

--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux