Bug 989656

Summary: PostScript generation of zoomed plots core dumps or produces incoherent PS.
Product: [Fedora] Fedora Reporter: Carlos Vidal <cvidal>
Component: bltAssignee: Dmitrij S. Kryzhevich <kryzhev>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 23CC: kryzhev
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-20 12:40:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carlos Vidal 2013-07-29 17:07:12 UTC
Description of problem:

When generating PostScript of complex plots and markers that exceed the drawable area (because of axis manipulation by the user), the program may crash or produce incoherent PostScript.

Version-Release number of selected component (if applicable):
Since 2.4-28.z

How reproducible:
Always with the right data ;-)

It is difficult to write a small test code, but it is easy to understand the fix (see below).

Patch:
--- src/bltPs.c 2002-09-19 00:30:51.000000000 +0200
+++ src/bltPs.c.cv  2011-02-22 17:02:27.414822430 +0100
@@ -810,6 +810,9 @@
 {
     register Point2D *pointPtr, *endPtr;

+    if(nScreenPts == 0 || screenPts == NULL)
+   return;
+
     pointPtr = screenPts;
     Blt_FormatToPostScript(tokenPtr, "newpath %g %g moveto\n",
    pointPtr->x, pointPtr->y);
@@ -828,6 +831,9 @@
     Point2D *screenPts;
     int nScreenPts;
 {
+    if(nScreenPts == 0 || screenPts == NULL)
+   return;
+
     Blt_PathToPostScript(tokenPtr, screenPts, nScreenPts);
     Blt_FormatToPostScript(tokenPtr, "%g %g ", screenPts[0].x, screenPts[0].y);
     Blt_AppendToPostScript(tokenPtr, " lineto closepath Fill\n", (char *)NULL);
--- src/bltGrMarker.c   2011-10-24 10:44:13.277213436 +0200
+++ src/bltGrMarker.c.cv    2013-07-24 17:45:22.739974120 +0200
@@ -3834,7 +3834,8 @@
     Graph *graphPtr = markerPtr->graphPtr;
     PolygonMarker *pmPtr = (PolygonMarker *)markerPtr;

-    if (pmPtr->fill.fgColor != NULL) {
+    if ((pmPtr->fill.fgColor != NULL) && (pmPtr->fillPts != NULL)
+           && (pmPtr->nFillPts != 0)) {

    /*
     * Options:  fg bg
@@ -3864,7 +3865,8 @@
     }

     /* Draw the outline in the foreground color.  */
-    if ((pmPtr->lineWidth > 0) && (pmPtr->outline.fgColor != NULL)) {
+    if ((pmPtr->lineWidth > 0) && (pmPtr->outline.fgColor != NULL)
+       && (pmPtr->outlinePts != NULL) && (pmPtr->nOutlinePts != 0)) {

    /*  Set up the line attributes.  */
    Blt_LineAttributesToPostScript(psToken, pmPtr->outline.fgColor,

Comment 1 Fedora End Of Life 2013-09-16 14:53:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 2 Fedora End Of Life 2015-05-29 09:13:46 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2015-06-29 12:08:23 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Jan Kurik 2015-07-15 14:46:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 5 Fedora End Of Life 2016-11-24 11:00:31 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2016-12-20 12:40:13 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.