bug-gv
[Top][All Lists]
Advanced

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

[bug-gv] segmentation fault in gv-3.6.2 + patch


From: Jose E. Marchesi
Subject: [bug-gv] segmentation fault in gv-3.6.2 + patch
Date: Sat, 31 Mar 2007 16:41:52 +0200

Hello.
    
    I just built and installed gv-3.6.2 and noticed that some users got a
    segmentation fault when loading their ~/.gv file (as produced by
        State -> Setup Options -> Save
    )
    
    Attached is a small patch correcting the buffer overflow that caused the
    segfault.


Many thanks for your contribution. I will install this patch in the
CVS.    


    Peter Breitenlohner <address@hidden>        Without this patch GV segfaults 
when reading ~/.gv
        as produced by
                State -> Setup Options -> Save
    
    diff -ur gv-3.6.2.orig/src/resource.c gv-3.6.2/src/resource.c
    --- gv-3.6.2.orig/src/resource.c    2005-08-10 13:33:21.000000000 +0200
    +++ gv-3.6.2/src/resource.c 2007-03-30 18:51:44.000000000 +0200
    @@ -137,7 +137,7 @@
       /* ### system resources ################# */
       INFMESSAGE(checking for system resources)
     
    -  rpath = GV_XtMalloc (strlen (GV_LIBDIR) + strlen ("/gv_system.ad"));
    +  rpath = GV_XtMalloc (strlen (GV_LIBDIR) + strlen ("/gv_system.ad") + 1);
       rpath[0] = '\0';
       strcat (rpath, GV_LIBDIR);
       strcat (rpath, "/gv_system.ad");





reply via email to

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