Tk Source Code

View Ticket
Login
Ticket UUID: 734361
Title: crash in PolygonToPostscript with 2 identical points
Type: Bug Version: None
Submitter: xtifr Created on: 2003-05-07 23:27:59
Subsystem: 06. Canvas Postscript Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-05-11 07:58:56
Resolution: Duplicate Closed By: hobbs
    Closed on: 2003-05-11 00:58:56
Description:
Forwarded bug report from Debian Project, submitted
(with patch) by  Andreas Wilm
<[email protected]> (for original
report, see http://bugs.debian.org/192302):

"Create a polygon with two identical points and no
outline color (I know this seems to be nonsense, but in
my case it was absolutely needed). Do a postscript
command on the canvas and you get the core dump (a
color NULL pointer is passed on from
PolygonToPostscript to Tk_PostscriptColor, where it is
referenced)."

To reproduce:

% canvas .c
% pack .c
% .c create polygon 10 20 10 20
% .c postscript

Debian maintainer comments: I can reproduce the crash
on 8.3.5 and 8.4.2. I haven't tested the patch, but it
looks straightforward enough.  The scenario may seem
odd, but it's the kind of thing that could easily arise
programatically, i,.e., graphing some data that
includes some degenerate cases.  Arguably a minor
problem, but it should not segfault!
User Comments: hobbs added on 2003-05-11 07:58:56:
Logged In: YES 
user_id=72656

This was dup'ed by 734498.  It has been fixed for 8.4.3 and 
8.5.

xtifr added on 2003-05-08 06:27:59:

File Added - 49839: polygon_ps.patch

Attachments: