Skip to content

Conversation

@fkil
Copy link

@fkil fkil commented Nov 27, 2025

Fixes #8705

In case of a 0-bitshift, the mask computation was performing a 64-bit shift, assuming the result will be 0. However, such a bitshift is undefined and will be equal to a NOP on some architectures.

This is fixed by explicitly checking for a shift-amount of 0.

Fixes NationalSecurityAgency#8705

In case of a 0-bitshift, the mask computation was performing a 64-bit shift,
assuming the result will be 0. However, such a bitshift is undefined and
will be equal to a NOP on some architectures.

This is fixed by explicitly checking for a shift-amount of 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature: Decompiler Status: Triage Information is being gathered

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decompiler: Wrong consumption mask computation for zero-bit left shift if varnode's size > sizeof(uintb)

3 participants