File fgets-overflow.patch of Package groff

--- src/devices/grops/ps.cc
+++ src/devices/grops/ps.cc
@@ -740,8 +740,8 @@
   if (fp == 0)
     fatal("can't open encoding file `%1'", encoding);
   int lineno = 1;
-  char buf[256];
-  while (fgets(buf, 512, fp) != 0) {
+  char buf[512];
+  while (fgets(buf, sizeof(buf), fp) != 0) {
     char *p = buf;
     while (csspace(*p))
       p++;
openSUSE Build Service is sponsored by