[Pkg-privacy-commits] [libotr] 87/225: Fix a broken malloc NULL return check in privkey.c

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:45:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository libotr.

commit 64fb4349e1037e178a8a8daade682f5d3a698f52
Author: Ian Goldberg <iang at cs.uwaterloo.ca>
Date:   Thu Jul 19 10:09:03 2012 -0400

    Fix a broken malloc NULL return check in privkey.c
    
    Thanks to Paul Wouters <paul at cypherpunks.ca> for the report.
---
 src/privkey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/privkey.c b/src/privkey.c
index f57f2b8..d0186b3 100644
--- a/src/privkey.c
+++ b/src/privkey.c
@@ -871,7 +871,7 @@ gcry_error_t otrl_privkey_sign(unsigned char **sigp, size_t *siglenp,
 	return gcry_error(GPG_ERR_INV_VALUE);
 
     *sigp = malloc(40);
-    if (sigp == NULL) return gcry_error(GPG_ERR_ENOMEM);
+    if (*sigp == NULL) return gcry_error(GPG_ERR_ENOMEM);
     *siglenp = 40;
 
     if (len) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libotr.git



More information about the Pkg-privacy-commits mailing list