CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2016/05/30 06:05:56
Modified files:
usr.bin/ssh : utf8.c
regress/usr.bin/ssh/unittests/utf8: tests.c
Log message:
Fix two rare edge cases:
1. If vasprintf() returns < 0, do not access a NULL pointer in snmprintf(),
and do not free() the pointer returned from vasprintf() because on some
systems other than OpenBSD, it might be a bogus pointer.
2. If vasprintf() returns == 0, return 0 and "" rather than -1 and NULL.
Besides, free(dst) is pointless after failure (not a bug).
One half OK martijn@, the other half OK deraadt@;
committing quickly before people get hurt.