Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (37m)  netbsd-10 (17d)  netbsd-9 (17d)  netbsd-8 (22d) 

2024-06-02 18:22:02 UTC Now

2018-06-12 21:22:47 UTC MAIN commitmail json YAML

Prevent Undefined Behavior in shift of signed integer in grep(1)

There is an interface in grep: dfa.c with functions to test bit, set bit,
clear bit etc. They operate over the INT-wide mask (INTBITS). Use unsigned
shift in these interfaces to prevent UB.

Detected with MKSANITIZER with the undefined behavior sanitizer option.

Sponsored by <The NetBSD Foundation>

(kamil)