From 4c85eb3d53e0c49ef3e4188f5495df251e670eaa Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 17 Aug 2020 09:37:02 +0200 Subject: [PATCH] pkcs11: Do not crash with invalid paths in ssh-agent (#1868996) --- openssh-8.0p1-pkcs11-uri.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openssh-8.0p1-pkcs11-uri.patch b/openssh-8.0p1-pkcs11-uri.patch index 50fd29a..724177d 100644 --- a/openssh-8.0p1-pkcs11-uri.patch +++ b/openssh-8.0p1-pkcs11-uri.patch @@ -1216,7 +1216,7 @@ new file mode 100644 index 00000000..e1a7b4e0 --- /dev/null +++ b/ssh-pkcs11-uri.c -@@ -0,0 +1,421 @@ +@@ -0,0 +1,425 @@ +/* + * Copyright (c) 2017 Red Hat + * @@ -1468,6 +1468,10 @@ index 00000000..e1a7b4e0 +void +pkcs11_uri_cleanup(struct pkcs11_uri *pkcs11) +{ ++ if (pkcs11 == NULL) { ++ return; ++ } ++ + free(pkcs11->id); + free(pkcs11->module_path); + free(pkcs11->token);