Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/external/gpl2/grep/dist/src



Module Name:    src
Committed By:   kamil
Date:           Tue Jun 12 21:22:47 UTC 2018

Modified Files:
        src/external/gpl2/grep/dist/src: dfa.c

Log Message:
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>


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/grep/dist/src/dfa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index