Merge lp:~brandontschaefer/mir/avoid-overflowing-use-long-long into lp:mir
Proposed by
Brandon Schaefer
Status: | Merged |
---|---|
Merged at revision: | 4277 |
Proposed branch: | lp:~brandontschaefer/mir/avoid-overflowing-use-long-long |
Merge into: | lp:mir |
Diff against target: |
23 lines (+4/-2) 1 file modified
src/miral/window_info.cpp (+4/-2) |
To merge this branch: | bzr merge lp:~brandontschaefer/mir/avoid-overflowing-use-long-long |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Alan Griffiths | Approve | ||
Chris Halse Rogers | Approve | ||
Review via email: mp+331571@code.launchpad.net |
Commit message
When we have sizeof(long) == sizeof(int) on armhf/i386 we are storing max::long as the max_aspect then we multiple the max::long * <some_value> which ends up overflowing. For now we'll just cast to long long giving us at lease 64bits.
Description of the change
When we have sizeof(long) == sizeof(int) on armhf/i386 we are storing max::long as the max_aspect then we multiple the max::long * <some_value> which ends up overflowing. For now we'll just cast to long long giving us at lease 64bits.
To post a comment you must log in.
Sure, as long as we actually fix this later.