From owner-bug-gnuplot@Dartmouth.EDU Fri Feb 11 17:25:23 2000 Return-Path: Received: by mailhost.nmrc.ucc.ie (Postfix, from userid 1) id E56AFEED5; Fri, 11 Feb 2000 17:25:22 +0000 (GMT) Received: from mailhub.Dartmouth.EDU (mailhub.dartmouth.edu [129.170.16.6]) by nmrc.ucc.ie (Postfix) with SMTP id 050B14F8B for ; Fri, 11 Feb 2000 17:24:36 +0000 (GMT) Received: (from mj@localhost) by mailhub.Dartmouth.EDU (8.9.3+DND/8.9.3) id MAA15034 for bug-gnuplot-outgoing; Fri, 11 Feb 2000 12:18:36 -0500 (EST) Received: from utrhcs.cs.utwente.nl (utrhcs.cs.utwente.nl [130.89.10.247]) by mailhub.Dartmouth.EDU (8.9.3+DND/8.9.3) with ESMTP id MAA12426 for ; Fri, 11 Feb 2000 12:18:34 -0500 (EST) Received: from zeus.cs.utwente.nl (zeus.cs.utwente.nl [130.89.10.12]) by utrhcs.cs.utwente.nl (8.9.3/8.9.3) with ESMTP id SAA04465 for ; Fri, 11 Feb 2000 18:19:22 +0100 (MET) Received: from erlang.cs.utwente.nl by zeus.cs.utwente.nl (8.8.8+Sun/csrelay-Sol1.4/RB) id SAA06171; Fri, 11 Feb 2000 18:19:23 +0100 (MET) Received: by erlang.cs.utwente.nl (8.8.8+Sun/SMI-SVR4) id SAA15812; Fri, 11 Feb 2000 18:19:21 +0100 (MET) From: ptdeboer@cs.utwente.nl (Pieter-Tjerk de Boer) Message-Id: <200002111719.SAA15812@erlang.cs.utwente.nl> Subject: ps(la)tex segfault in 3.7.1 and 3.8b To: bug-gnuplot@Dartmouth.EDU Date: Fri, 11 Feb 2000 18:19:21 +0100 (MET) X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-bug-gnuplot@Dartmouth.EDU Precedence: bulk Status: RO X-Status: A Content-Length: 643 Lines: 24 Hello, Not setting the output file name for the pstex and pslatex drivers causes a segmentation fault in gnuplot 3.7.1 and 3.8b (but not 3.7.0); for example: > set term pslatex > p x The cause is in line 216 of pslatex.trm in 3.8b (line 189 in 3.7.1): if ((dotIndex = strrchr(outstr, '.')) == NULL) If the output file name has not been set, outstr is NULL, causing the above to fail. Adding a condition like if (outstr && (dotIndex = strrchr(outstr, '.')) == NULL) cures the problem. (In 3.7.0 this condition was present.) Greetings, Pieter-Tjerk [[[[ unsubscribe from bug-gnuplot via majordomo@dartmouth.edu ]]]]