* mdocml: When a file is given on the command line, actually exists, and
@ 2014-12-30 20:41 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-12-30 20:41 UTC (permalink / raw)
To: source
Log Message:
-----------
When a file is given on the command line, actually exists, and its name
relative to the respective manual tree is longer than PATH_MAX, do not
leak the memory allocated to hold the name. Not sure that can actually
happen, but better safe than sorry.
FreeBSD Coverity Scan CID 1261303, reported by Pedro Giffuni <pfg@>.
Modified Files:
--------------
mdocml:
mandocdb.c
Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandocdb.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.179 -r1.180
--- mandocdb.c
+++ mandocdb.c
@@ -852,6 +852,7 @@ filescan(const char *file)
if (strlcpy(mlink->file, start, sizeof(mlink->file)) >=
sizeof(mlink->file)) {
say(start, "Filename too long");
+ free(mlink);
return;
}
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-30 20:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-30 20:41 mdocml: When a file is given on the command line, actually exists, and 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).