Number: 1889
Title: Segfault on "dot -c" when unable to open the config file
Submitter: Marc Lasson
Date: Sun Feb 21 10:33:09 2010
Subsys: Dot
Version: dot - graphviz version 2.26.3 (20100126.1600)
System: x86-Linux-3
Severity: minor
Problem:
Just run "dot -c" as non-root user.

Fails with :


$./dot -c
Error: failed to open /home/mlasson/dot/tmp/lib/graphviz/config6 for write.
Segmentation fault

Comments:
#2 config_rescan (gvc=0x6048e0, rescan=1 '001') at gvconfig.c:376 376 fprintf(f, "# This file was generated by "dot -c" at time of install.nn"); (gdb) l 371 f = fopen(config_path,"w"); 372 if (!f) { 373 agerr(AGERR,"failed to open %s for write.n", config_path); 374 } 375 376 fprintf(f, "# This file was generated by "dot -c" at time of install.nn");

Fix: It should probably exit inside the if block.
Owner: ellson
Status: *