Mir

Merge lp://qastaging/~brandontschaefer/mir/dont-divide-by-zero-miral into lp://qastaging/mir

Proposed by Brandon Schaefer
Status: Rejected
Rejected by: Brandon Schaefer
Proposed branch: lp://qastaging/~brandontschaefer/mir/dont-divide-by-zero-miral
Merge into: lp://qastaging/mir
Diff against target: 116 lines (+66/-4)
3 files modified
src/miral/window_info.cpp (+4/-4)
tests/miral/CMakeLists.txt (+1/-0)
tests/miral/window_info.cpp (+61/-0)
To merge this branch: bzr merge lp://qastaging/~brandontschaefer/mir/dont-divide-by-zero-miral
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing
Alan Griffiths Needs Information
Alberto Aguirre (community) Approve
Review via email: mp+330702@code.qastaging.launchpad.net

Commit message

When a client gives a negative window width or height and leaves the default aspect ratio a divide by zero will happen when calculating width/height correction.

Description of the change

When a user gives a negative window width or height and leaves the default aspect ratio a divide by zero will happen when calculating width/height correction.

Stacktrace
http://paste.ubuntu.com/25523431/

To post a comment you must log in.
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Ok.

review: Approve
Revision history for this message
MichaƂ Sawicz (saviq) wrote :

Until we have new Mir in xenial, would you please submit that against lp:miral as well, this way we'd get it sooner in mir-libs.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Isn't this fixing the wrong thing?

We should not be allowing WindowInfo::width_inc()/height_inc() to be non-positive.

AFAICS a client attempting this ought to have its request rejected.

review: Needs Information
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

https://code.launchpad.net/~brandontschaefer/miral/fix-unsigned-to-long-overflow/+merge/330778

WIP for now here, will most likely merge ^ if that one is approved

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Alan has a better fix, rejecting!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches