On Sat, Feb 24, 2018 at 10:34:26AM +0700, Nguyễn Thái Ngọc Duy wrote: > This is mostly for displaying the hash algorithm name when we report > errors. Printing "unknown" with '%s' is much better than '(null)' in > glibc printf version (and probably could crash if other implementations > do not check for NULL pointer) This is a good change. Using a NULL pointer with %s on the BSDs definitely did cause a crash, last I checked. I looked at the comment I wrote in hash.h, and based on that, it is indeed very likely that someone would accidentally write code this way. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204
Attachment:
signature.asc
Description: PGP signature