Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001061graphvizNeatopublic2006-02-17 10:482011-04-28 04:03
ReporterPhilipp Thomas 
Assigned Toerg 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOS*-Linux-OS Version
Summary0001061: [neato]description files with splines turned on crash neato
Description



As reported to Novell's bugzilla:



Example file file.dot:



digraph "test" {
  splines=true
  a -> b
}



Run with "neato file.dot" and neato will crash with SIGSEGV.
This is because gmalloc from lib/common/memory.c returns (char *)1 if
nbytes is zero:



void *gmalloc(size_t nbytes)
{
  ...
  return (char *)1; /* NB Return an invalid pointer - since nobody seems to
check for NULL */
  ...
}
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT 
--- lib/neatogen/neatosplines.c
+++ lib/neatogen/neatosplines.c
@@ -61,6 +61,8 @@
        n = n + poly[i]->pn;
     }
     bar = N_GNEW(n, Pedge_t);
+ if (bar == (Pedge_t *)1)
+ bar = (Pedge_t *)0;
     b = 0;
     for (i = 0; i < npoly; i++) {
FORMER-ID883
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     2.6
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => erg


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker