summaryrefslogtreecommitdiffstats
path: root/groff-1.16-safer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'groff-1.16-safer.patch')
-rw-r--r--groff-1.16-safer.patch23
1 files changed, 7 insertions, 16 deletions
diff --git a/groff-1.16-safer.patch b/groff-1.16-safer.patch
index 1ddafb6..de58923 100644
--- a/groff-1.16-safer.patch
+++ b/groff-1.16-safer.patch
@@ -1,21 +1,18 @@
---- groff-1.19.1/src/roff/troff/input.cpp.safer 2004-05-05 18:41:58.000000000 +0200
-+++ groff-1.19.1/src/roff/troff/input.cpp 2005-01-12 13:27:33.947740912 +0100
-@@ -5444,20 +5444,35 @@ void source()
- if (nm.is_null())
- skip_line();
+--- groff-1.16/src/roff/troff/input.cc.safer Wed Jun 7 21:47:48 2000
++++ groff-1.16/src/roff/troff/input.cc Wed Jun 7 21:50:37 2000
+@@ -4404,12 +4406,28 @@
else {
-+ char cbuf[PATH_MAX], * cwd;
-+ char pbuf[PATH_MAX], * path;
-+ struct stat st;
-+
while (!tok.newline() && !tok.eof())
tok.next();
- errno = 0;
-- FILE *fp = include_search_path.open_file_cautious(nm.contents());
+- FILE *fp = fopen(nm.contents(), "r");
- if (fp)
- input_stack::push(new file_iterator(fp, nm.contents()));
- else
- error("can't open `%1': %2", nm.contents(), strerror(errno));
++ char cbuf[PATH_MAX], * cwd;
++ char pbuf[PATH_MAX], * path;
++ struct stat st;
+
+ if ((cwd = realpath(".", cbuf)) == NULL)
+ error("realpath on `%1' failed: %2", ".", strerror(errno));
@@ -38,9 +35,3 @@
tok.next();
}
}
-
--// like .so but use popen()
--
- void pipe_source()
- {
- if (safer_flag) {