diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-30 20:41:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-30 20:41:00 +0000 |
commit | 824102957f73b26c300231632f733a22d2a3fd05 (patch) | |
tree | b40d689e17554c4ecdcd8d65f0ef0d2717444f18 /mandocdb.c | |
parent | 3c7801b6586ff9d8a6a2cfee05f2784bee905ed4 (diff) | |
download | mandoc-824102957f73b26c300231632f733a22d2a3fd05.tar.gz |
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@>.
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |