http://bugs.winehq.org/show_bug.cgi?id=58320
Bug ID: 58320 Summary: ok() macro should not evaluate the format arguments if condition is not met. Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: testcases Assignee: wine-bugs@winehq.org Reporter: yshuiv7@gmail.com Distribution: ---
While running the test suite under ASan I noticed in several instances where the format arguments given to the ok() macro is only safe to evaluate if the test case has failed.
One such example is in bcrypt/tests: https://gitlab.winehq.org/wine/wine/-/blob/d9148e48a3257ae80361f02f0bb7a2d60...
accessing `buffer[i]` is only safe if the test `i == sizeof(buffer)` has failed, and if the test case passes, we will access `buffer` out-of-bound.
http://bugs.winehq.org/show_bug.cgi?id=58320
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org Fixed by SHA1| |a9edbf49ae71df7904193b9fb99 | |240727920fb48 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Bernhard Übelacker bernhardu@mailbox.org --- I guess this bug can now be marked as fixed.
https://gitlab.winehq.org/wine/wine/-/commit/a9edbf49ae71df7904193b9fb992407...
Thanks, yshui, with that I could drop quite a few patches from my tree.
http://bugs.winehq.org/show_bug.cgi?id=58320
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 10.19.