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 1349675: Null pointer dereference
details: https://anonhg.NetBSD.org/src/rev/768558b608e7
branches: trunk
changeset: 346538:768558b608e7
user: christos <christos%NetBSD.org@localhost>
date: Mon Jul 18 17:04:29 2016 +0000
description:
CID 1349675: Null pointer dereference
diffstat:
external/bsd/mdocml/dist/read.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (24 lines):
diff -r 4538feca49df -r 768558b608e7 external/bsd/mdocml/dist/read.c
--- a/external/bsd/mdocml/dist/read.c Mon Jul 18 17:02:44 2016 +0000
+++ b/external/bsd/mdocml/dist/read.c Mon Jul 18 17:04:29 2016 +0000
@@ -688,12 +688,14 @@
if (curp->man == NULL && curp->sodest == NULL)
curp->man = roff_man_alloc(curp->roff, curp, curp->defos,
curp->options & MPARSE_QUICK ? 1 : 0);
- if (curp->man->macroset == MACROSET_NONE)
- curp->man->macroset = MACROSET_MAN;
- if (curp->man->macroset == MACROSET_MDOC)
- mdoc_endparse(curp->man);
- else
- man_endparse(curp->man);
+ if (curp->man != NULL) {
+ if (curp->man->macroset == MACROSET_NONE)
+ curp->man->macroset = MACROSET_MAN;
+ if (curp->man->macroset == MACROSET_MDOC)
+ mdoc_endparse(curp->man);
+ else
+ man_endparse(curp->man);
+ }
roff_endparse(curp->roff);
}
Home |
Main Index |
Thread Index |
Old Index