Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/mdocml/dist CID 1288958: Prevent NULL deref



details:   https://anonhg.NetBSD.org/src/rev/fce0e40ebaae
branches:  trunk
changeset: 342750:fce0e40ebaae
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 07 19:46:00 2016 +0000

description:
CID 1288958: Prevent NULL deref

diffstat:

 external/bsd/mdocml/dist/mdoc_validate.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r fd520bee6ffc -r fce0e40ebaae external/bsd/mdocml/dist/mdoc_validate.c
--- a/external/bsd/mdocml/dist/mdoc_validate.c  Thu Jan 07 19:32:43 2016 +0000
+++ b/external/bsd/mdocml/dist/mdoc_validate.c  Thu Jan 07 19:46:00 2016 +0000
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_validate.c,v 1.7 2015/12/17 22:31:12 christos Exp $ */
+/*     $Id: mdoc_validate.c,v 1.8 2016/01/07 19:46:00 christos Exp $ */
 /*
  * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps%bsd.lv@localhost>
  * Copyright (c) 2010-2015 Ingo Schwarze <schwarze%openbsd.org@localhost>
@@ -1464,7 +1464,8 @@
                        assert(NULL == nnext);
                } else {
                        nbody->child = nnext;
-                       nnext->prev = NULL;
+                       if (nnext)
+                               nnext->prev = NULL;
                }
 
                /*



Home | Main Index | Thread Index | Old Index