After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698758 - Wrong limit for "Native Windows wider or taller than 65535 pixels are not supported"
Wrong limit for "Native Windows wider or taller than 65535 pixels are not sup...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 601616 604641 648381 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-04-24 15:51 UTC by Morten Welinder
Modified: 2013-08-14 02:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Minimally invasive patch (912 bytes, patch)
2013-07-24 17:17 UTC, Morten Welinder
none Details | Review

Description Morten Welinder 2013-04-24 15:51:38 UTC
Callling gdk_window_move_resize with crazy sizes gives you

    Native Windows wider or taller than 65535 pixels are not supported

and the width/height get clipped at 65535.

Which is fine, except...

The limit is wrong.  It should have been 32767.  Go beyond that and I see
an instant BadValue error and the program dies.
Comment 1 Morten Welinder 2013-06-20 14:27:57 UTC
*** Bug 648381 has been marked as a duplicate of this bug. ***
Comment 2 Morten Welinder 2013-06-20 14:28:17 UTC
*** Bug 604641 has been marked as a duplicate of this bug. ***
Comment 3 Fabian Keil 2013-07-24 09:54:07 UTC
This bug presents a DoS vulnerability for some gtk consumers and a patch has been submitted more than two years ago in Bug 648381.

Given that Bug 648381 also contains an example program to reproduce the issue I'm puzzled why the status is still UNCONFIRMED.
Comment 4 Emmanuele Bassi (:ebassi) 2013-07-24 10:19:44 UTC
(In reply to comment #3)

> Given that Bug 648381 also contains an example program to reproduce the issue
> I'm puzzled why the status is still UNCONFIRMED.

gtk developers don't use the NEW status: bugs go from UNCONFIRMED to either NEEDINFO or RESOLVED.

as for Windows bugs: there is a lack of backend maintainers, so patches go in after they have been tested by at least a couple of people using the win32 backend of GDK and confirmed to be working.
Comment 5 Emmanuele Bassi (:ebassi) 2013-07-24 10:26:27 UTC
oh, sorry, I thought it was for the Windows backend, not for the X11 one.

there is no version set either.

the patch in bug 648381 needs work.
Comment 6 Morten Welinder 2013-07-24 13:22:41 UTC
It's a three-line patch (plus changes in an error path).  It doesn't
really need work as much as it needs to be applied.

(But, yeah, using MIN is fine.  Macro vs variable is not substantial,
but as a variable it should be given a type instead of implied int.)
Comment 7 Emmanuele Bassi (:ebassi) 2013-07-24 13:28:30 UTC
since we are the people maintaining this code, and not you, we'd like code to follow our style, conventions, and behaviour. this means that patches have to be functionally correct *and* stylistically correct before being applied.
Comment 8 Morten Welinder 2013-07-24 17:17:31 UTC
Created attachment 250057 [details] [review]
Minimally invasive patch

This patch preserves all coding style, all convensions, and all behaviour
(except for the bug being fixed).
Comment 9 Morten Welinder 2013-07-24 17:43:33 UTC
Emmanuele Bassi: it is not reasonable to ask for minor stylistic changes
in a patch like the one over in bug 648381.  (1) it takes you longer to
ask than to change to your heart's content; (2) the patch is TWO YEARS OLD.

After two years it isn't reasonable to simply assume that the submitter
will get the mail.  And hasn't moved on.  You are asking him to
reestablish a development environment, change the patch, re-test,
resubmit, wait two more years[*], and hope the patch will pass muster
with the coding conventions in place at that time.  Rinse and repeat.

That is blatant disregard for other people's effort.  He identified the
problem, he reported the problem coherently, he devised an effective fix.
That kind of effort deserves a better response.[**]





[*] The only available data to base an estimate on is how long it took
the first time.

[**] And he is in all likelihood a nicer person than I am.
Comment 10 Matthias Clasen 2013-07-30 01:00:14 UTC
thanks for the patch
Comment 11 Matthias Clasen 2013-08-14 02:55:27 UTC
*** Bug 601616 has been marked as a duplicate of this bug. ***