Bug 4947 - Xv byteswap
Summary: Xv byteswap
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Alan Coopersmith
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-02 17:27 UTC by Scott Arnold
Modified: 2008-01-02 19:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Scott Arnold 2005-11-02 17:27:38 UTC
FYI Byteswap routines are broken in xvdisp.c. SWriteQueryExtensionReply for 
instance is calling WriteToClient with (char *)&rep (pointer to nothing) as 
last arg. I believe it should be (char *)rep. In my situation the client is 
running on SGI (Irix 6.5) server is running on linux / X86. Apparently these 
routines were never tested. I am working on a fix. Fixed return args but 
server is now aborting elsewere. Works fine with same-sex platform. Using 
xvinfo to test.

Scott
Comment 1 Erik Andren 2006-05-03 06:06:47 UTC
So how is that fix going?
Comment 2 Scott Arnold 2006-05-03 08:23:30 UTC
(In reply to comment #1)
> So how is that fix going?

I have it fixed, Server is working fine now. 
I will check to see if I can send the code.
Comment 3 Erik Andren 2006-05-21 18:56:38 UTC
Please attach to the code to this bug and keyword it as a patch.
Comment 4 Daniel Stone 2007-02-27 01:28:38 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 5 Alan Coopersmith 2008-01-02 16:19:14 UTC
I don't see a proposed patch ever got attached, but hit this today, and confirmed
the diagnosis in comment #0, as well as additional errors from using variables
like length fields or number of items in a list after swapping them.    Will 
commit patch to Xorg git master shortly.
Comment 6 Alan Coopersmith 2008-01-02 19:36:43 UTC
Fix committed to git master:

commit dfd682b582636a36345144bcf835e3ee46718d90
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Wed Jan 2 19:27:22 2008 -0800

    X.Org bug 4947/Sun bug 6646626: Xv extension not byte-swapping properly
    
    X.Org Bugzilla #4947 <https://bugs.freedesktop.org/show_bug.cgi?id=4947>
    Sun bug 6646626 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6646626>
    
    Don't use swapped data after swapping it.   When done swapping data,
    send the swapped data, not the address of the pointer to it, to the client.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.