0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-05-10 05:45:31 +00:00
Files
termux-packages/packages/mandoc/read.c.patch
TomIO 67be0d0688 rename(main/man): mandoc
Also fix up outdated build options
clean up build and ship a `/etc/man.conf`
2025-04-21 16:40:42 +02:00

17 lines
399 B
Diff

https://github.com/termux/termux-packages/issues/16476
--- a/read.c
+++ b/read.c
@@ -445,6 +445,11 @@
return -1;
}
+ if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) {
+ mandoc_msg(MANDOCERR_BADARG_BAD, 0, 0, "%s", strerror(EINVAL));
+ return -1;
+ }
+
/*
* If we're a regular file, try just reading in the whole entry
* via mmap(). This is faster than reading it into blocks, and