Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 649809

Summary: Integer overflow for dashed lines longer than 46340
Product: Red Hat Enterprise Linux 6 Reporter: Olivier Fourdan <ofourdan>
Component: xorg-x11-serverAssignee: Adam Jackson <ajax>
Status: CLOSED NEXTRELEASE QA Contact: desktop-bugs <desktop-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: kem, spoyarek
Target Milestone: rcKeywords: Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 649810 649811 (view as bug list) Environment:
Last Closed: 2011-08-17 19:49:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 649810, 649811, 662543    
Attachments:
Description Flags
Reproducer program
none
Proposed patch none

Description Olivier Fourdan 2010-11-04 15:46:17 UTC
Created attachment 457831 [details]
Reproducer program

Description of problem:

Lines of length greater than 46340 can be drawn with one of the coordinates being negative. However for dashed lines, miPolyBuildPoly() overflows the "int" type when setting up edges for a section of the dashed line. This results in the dashed segments not being drawn at all.

Version-Release number of selected component (if applicable):

xorg-x11-server-1.7.7-26.el6

How reproducible:

Always

Steps to Reproduce:

1. Save attached reproducer program as line.c
2. Build the rproducer program with
   $ gcc -DBREAK -o line line.c -lX11
3. Run the test program in X11
   $ ./line
4. Right-click within the window created by the test application
  
Actual results:

No dotted line is displayed

Expected results:

A dotted line is shown

Additional info:

Remove the "-DBREAK"  from step #2 to get the expected result. The difference is that defining BREAK sets y2 to 31341 causing the overflow.

This has been reported upstream as bug 31093:

  https://bugs.freedesktop.org/show_bug.cgi?id=31093

The patch proposed by Siddhesh Poyarekar has been reviewed by Keith Packard:

  http://lists.x.org/archives/xorg-devel/2010-October/014559.html

Comment 1 Olivier Fourdan 2010-11-04 15:48:22 UTC
Created attachment 457832 [details]
Proposed patch

Patch by Siddhesh Poyarekar proposed in upstream bug fd.o #31093

Comment 2 Matěj Cepl 2010-11-12 20:21:55 UTC
Yes, reproduce as described.

Comment 3 RHEL Program Management 2011-01-07 04:34:53 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 4 Suzanne Logcher 2011-01-07 16:18:19 UTC
This request was erroneously denied for the current release of Red Hat
Enterprise Linux.  The error has been fixed and this request has been
re-proposed for the current release.

Comment 5 RHEL Program Management 2011-02-01 06:05:36 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 6 RHEL Program Management 2011-02-01 18:50:55 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 7 RHEL Program Management 2011-04-04 02:33:37 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 8 Adam Jackson 2011-08-17 19:49:14 UTC
Fixed in 6.2 for free by the xserver rebase, closing.