Repository navigation
Conversation
bb6f393 to
22aaa30
Compare
Debugfuzzer will end up pushing such amount of characters into the count gatherer that we eventually overflow long type. Limit the count to what signed int could hold. This still allows 8 digits and that should be enough for practical purposes. This will prevent long overflow and spurious ubsan reports.
22aaa30 to
a0c758b
Compare
|
Example of ubsan report when debugfuzzer fills the count calculation into overflow: ../win/tty/wintty.c:1568:28: runtime error: signed integer overflow: 1192464466725874314 * 10 cannot be represented in type 'long int' |
|
Commit d5785f2 referenced this entry in error (last two digits were transposed). |
> If there's a trap on a no-dig level, the floor beneath it will always be "too hard to dig into", making it impossible to remove the trap. > > As you can still dig pits in these levels (just not holes), the floor under the trap itself resisting to become a pit seems inconsistent. > > Steps to reproduce: > > Go to no-dig level like Mine's End > Make a trap > Dig a pit next to it -> works > Dig on the trap -> does not work Return more information about the dig_check() results to caller (was just a boolean). Move the messaging that was in dig_check() into a separate digcheck_fail_message() function that uses the expanded return information. Resolves #1254 .
Debugfuzzer will end up pushing such amount of characters into the count gatherer that we eventually overflow long type.
Limit the count to what signed int could hold. This still allows 8 digits and that should be enough
for practical purposes.
This will prevent long overflow and spurious ubsan reports.