Module Name:    src
Committed By:   shm
Date:           Fri Sep  8 14:22:04 UTC 2023

Modified Files:
        src/usr.bin/mail: vars.c

Log Message:
Fixed undefined behaviour in hash()

Shift left on large int values was causing an undefined behaviour, fix it by
operating on unsigned int type instead. This patch changes behaviour of the
hash() slightly - if the computed hash is INT_MIN, the function previously
returned 0, but this case is negligible.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mail/vars.c

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

Reply via email to