This repository has been archived on 2024-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
evolution-packages/srcpkgs/mdocml/patches/cgi-gz.patch

23 lines
589 B
Diff
Raw Normal View History

2023-08-05 21:19:04 +01:00
--- a/cgi.c
+++ b/cgi.c
@@ -879,14 +879,15 @@
int fd;
int usepath;
- if (-1 == (fd = open(file, O_RDONLY, 0))) {
+ mchars_alloc();
+ mp = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1 |
+ MPARSE_VALIDATE, MANDOC_OS_OTHER, req->q.manpath);
+
+ if (-1 == (fd = mparse_open(mp, file))) {
puts("<p>You specified an invalid manual file.</p>");
return;
}
- mchars_alloc();
- mp = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1 |
- MPARSE_VALIDATE, MANDOC_OS_OTHER, req->q.manpath);
mparse_readfd(mp, fd, file);
close(fd);
meta = mparse_result(mp);