* mandoc: Make sure that -l always causes -w to be ignored, as documented
@ 2020-02-06 19:42 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2020-02-06 19:42 UTC (permalink / raw)
To: source
Log Message:
-----------
Make sure that -l always causes -w to be ignored, as documented
in the man(1) manual page. This bugfix is needed to prevent
the command "man -lw" from dereferencing a NULL pointer.
Modified Files:
--------------
mandoc:
main.c
Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/main.c,v
retrieving revision 1.341
retrieving revision 1.342
diff -Lmain.c -Lmain.c -u -p -r1.341 -r1.342
--- main.c
+++ main.c
@@ -1,7 +1,7 @@
/* $Id$ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2012, 2014-2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -326,7 +326,8 @@ main(int argc, char *argv[])
/* Postprocess options. */
- if (outmode == OUTMODE_DEF) {
+ switch (outmode) {
+ case OUTMODE_DEF:
switch (search.argmode) {
case ARG_FILE:
outmode = OUTMODE_ALL;
@@ -339,6 +340,16 @@ main(int argc, char *argv[])
outmode = OUTMODE_LST;
break;
}
+ break;
+ case OUTMODE_FLN:
+ if (search.argmode == ARG_FILE)
+ outmode = OUTMODE_ALL;
+ break;
+ case OUTMODE_ALL:
+ break;
+ case OUTMODE_LST:
+ case OUTMODE_ONE:
+ abort();
}
if (oarg != NULL) {
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-06 19:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 19:42 mandoc: Make sure that -l always causes -w to be ignored, as documented schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).