Number: 2007
Title: Tcldot generates segv if no plugins found
Submitter: Lloyd Lewins
Date: Tue Jul 27 18:10:25 2010
Subsys: Tcl/Tk utilities
Version: 2.26-3
System: x86-Windows-Cygwin
Severity: minor
Problem:
It Tcldot is run when no plug-ins are specified (for example if the config6) file is missing, then it generates a segv when layout is performed. The problem appears to be with the fprintf (giving an error message) at line 618. In the case where engine is null, gvplugin_list doesn't check for the pointer str being null before calling strdup on it -- this causes a segv inside strlen.
Input:
package require Tcldot
set c [canvas .c]
pack $c
set g [dotnew digraph rankdir LR]
$g setnodeattribute style filled color white
[$g addnode Hello] addedge [$g addnode World!]
$g layout
if {[info exists debug]} {
    puts [$g render]         ;# see what render produces
}
eval [$g render]
Owner: ellson
Status: *