bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61073] [groff]: SEGV with a single option as input


From: Bjarni Ingi Gislason
Subject: [bug #61073] [groff]: SEGV with a single option as input
Date: Fri, 27 Aug 2021 09:58:09 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Follow-up Comment #7, bug #61073 (project groff):

  I have made these two changes in "font.cpp":


commit a593cf5cb0ee87cc1a12fb21d13c1b2b8ec4554c
Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date:   Fri Jul 2 06:51:10 2021 +0000

    src/libs/libgroff/font.cpp: added "path" to the output of "can't find
    'DESC' file"

diff --git a/src/libs/libgroff/font.cpp b/src/libs/libgroff/font.cpp
index df6df0b7..414678f9 100644
--- a/src/libs/libgroff/font.cpp
+++ b/src/libs/libgroff/font.cpp
@@ -1034,7 +1034,7 @@ int font::load_desc()
   FILE *fp;
   char *path;
   if ((fp = open_file("DESC", &path)) == 0) {
-    error("can't find 'DESC' file");
+    error("can't find 'DESC' file in path '%1'", path);
     return 0;
   }
   text_file t(fp, path);


commit 2ce4ba914e9a3d15c098a5db295149dec30e77fd
Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date:   Fri Aug 27 00:43:44 2021 +0000

    src/libs/libgroff/font.cpp: give '*path' the value 'NULL' to fix bug
#61073

diff --git a/src/libs/libgroff/font.cpp b/src/libs/libgroff/font.cpp
index 108e3d1f..c8053544 100644
--- a/src/libs/libgroff/font.cpp
+++ b/src/libs/libgroff/font.cpp
@@ -1036,7 +1036,7 @@ int font::load_desc()
 {
   int nfonts = 0;
   FILE *fp;
-  char *path;
+  char *path = NULL;
   if ((fp = open_file("DESC", &path)) == 0) {
     error("can't find 'DESC' file in path '%1'", path);
     return 0;


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61073>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]