From 873e52cc72701f7a5714a5006f15810ba5981d10 Mon Sep 17 00:00:00 2001 From: Pankaj Date: Tue, 20 Sep 2016 18:06:17 +0200 Subject: proxy: Check return value of calloc() https://bugs.freedesktop.org/show_bug.cgi?id=92815 --- p11-kit/proxy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/p11-kit/proxy.c b/p11-kit/proxy.c index c554511..77e70c0 100644 --- a/p11-kit/proxy.c +++ b/p11-kit/proxy.c @@ -580,6 +580,7 @@ proxy_C_OpenSession (CK_X_FUNCTION_LIST *self, } else { sess = calloc (1, sizeof (Session)); + return_val_if_fail (sess != NULL, CKR_HOST_MEMORY); sess->wrap_slot = map.wrap_slot; sess->real_session = *handle; sess->wrap_session = ++state->last_handle; /* TODO: Handle wrapping, and then collisions */ -- cgit v1.1