New issue
Advanced search Search tips

Issue 683367 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

ui/gfx/x/x11_types.cc - XPutImage is missing error handling

Reported by leanderz...@gmail.com, Jan 20 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

Steps to reproduce the problem:
1.  This is a bug found by our static analysis tool
2. 
3. 

What is the expected behavior?

What went wrong?
In the function PutARGBImage(),  if the color masks match, XPutImage() is called. However, according to the definition of XPutImage(https://tronche.com/gui/x/xlib/graphics/XPutImage.html), it can return various errors, e.g, BadDrawable , BadGC , BadMatch , and BadValue. When the errors occur, no error handler was implemented in the function. Can you fix it?

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 55.0.2883.95  Channel: stable
OS Version: OS X 10.12.2
Flash Version: Shockwave Flash 24.0 r0
 
Components: Internals>Graphics
Labels: -Hotlist-Interop
Summary: ui/gfx/x/x11_types.cc - XPutImage is missing error handling (was: A semantic error in ui/gfx/x/x11_type.cc)
Since you do not supply any webby code, I do not see how this "works in other browsers", therefore, I am removing the label.

Also, I the file name had a typo.

Comment 2 by ajha@chromium.org, Jan 24 2017

Labels: Needs-Triage-M55

Comment 3 by enne@chromium.org, Jan 25 2017

Components: -Internals>Graphics Internals>GPU

Comment 4 by enne@chromium.org, Jan 31 2017

Labels: -Needs-Triage-M55
Status: Available (was: Unconfirmed)
Is this an error that's occurring in practice?

I'm happy to route a patch to the right person if you want to write one that fixes this.
Status: WontFix (was: Available)
XPutImage always returns 0.  Please see https://github.com/mirror/libX11/blob/master/src/PutImage.c#L932

The errors you mention (BadDrawable , BadGC , BadMatch , and BadValue) are handled asynchronously https://cs.chromium.org/chromium/src/chrome/browser/chrome_browser_main_extra_parts_x11.cc?rcl=06f6cd0653d33dc0e087cf3aede5df399ffc9db0&l=29

Sign in to add a comment