[Pkg-privacy-commits] [libotr] 91/225: Protect against a possible future NULL pointer dereference

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:45:02 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 85abd247a652713a16a6963d32f7fcc0140fa346
Author: Ian Goldberg <iang at cs.uwaterloo.ca>
Date:   Fri Jul 20 06:01:27 2012 -0400

    Protect against a possible future NULL pointer dereference
    
    It turns out it can't happen in the current code, as messagep
    can't be NULL at this point if an error hasn't been flagged.
    But still, better safe, in case something changes later.
---
 src/message.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/message.c b/src/message.c
index 1c68648..38de531 100644
--- a/src/message.c
+++ b/src/message.c
@@ -394,7 +394,7 @@ fragment:
 	return err;
     } else {
 	/* Fragment and send according to policy */
-	if (!err && *messagep) {
+	if (!err && messagep && *messagep) {
 	    if (context) {
 		err = fragment_and_send(ops, NULL, context, *messagep,
 			fragPolicy, messagep);

-- 
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