zeek/tools/binpac
Jon Siwek c5fe0eaa17 binpac: GH-14: Use larger temporary storage for evaluating case-expressions
For example:

    inum: uint32 = case (ed & 0x0f) of {
        0x00    -> n_8;  # n_8 is a uint8
        0x01    -> n_16; # n_16 is a uint16
        0x02    -> n_32; # n_32 is a uint32
        default -> 0;
    };

Previously, the temporary storage used for evaluating the
case-expression was based on whatever type the first case yields, which
is a uint8 in the above example.  That behavior can lead to a narrowing
conversion whenever the 0x01 or 0x02 cases occur.

The new behavior is to base the temporary storage's type on the largest
numeric type that the case-expression can yield, which is uint32 in the
above example.
2025-08-20 08:52:23 -07:00
..
lib binpac: Move RE_Matcher to zeek namespace 2025-08-20 08:52:23 -07:00
patches binpac: Distribution cleanup. 2025-08-20 08:52:23 -07:00
src binpac: GH-14: Use larger temporary storage for evaluating case-expressions 2025-08-20 08:52:23 -07:00
CMakeLists.txt binpac: Update minimum required CMake to 3.5 2025-08-20 08:52:23 -07:00
TODO binpac: Rename Bro to Zeek 2025-08-20 08:52:23 -07:00