components/groff/patches/lkbib_core_empty.patch
author John Beck <John.Beck@Oracle.COM>
Fri, 09 Sep 2016 13:08:45 -0700
changeset 6889 83e26eb7e42b
parent 6451 680395ed1e35
permissions -rw-r--r--
24624202 virtualenv needs bypass on S11

This patch comes from in-house and has been submitted upstream:
https://savannah.gnu.org/bugs/?48433

--- groff-1.22.3/src/libs/libbib/index.cpp.org	2014-11-04 17:38:35.183524522 +0900
+++ groff-1.22.3/src/libs/libbib/index.cpp	2016-07-07 09:41:11.572149218 +0900
@@ -158,6 +158,10 @@
   }
   mtime = sb.st_mtime;
   int size = int(sb.st_size);
+  if (size == 0) {
+    error("`%1' is an empty file", name);
+    return 0;
+  }
   char *addr;
   map_addr = mapread(fd, size);
   if (map_addr) {