]> git.ipfire.org Git - thirdparty/openssh-portable.git/commit
upstream commit
authorschwarze@openbsd.org <schwarze@openbsd.org>
Mon, 30 May 2016 12:05:56 +0000 (12:05 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 8 Jun 2016 01:45:05 +0000 (11:45 +1000)
commit75f0844b4f29d62ec3a5e166d2ee94b02df819fc
treec58869d41e11844e2e86358b6c7cdb5a235c64f7
parent016881eb33a7948028848c90f4c7ac42e3af0e87
upstream commit

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.

Upstream-Regress-ID: b164f20923812c9bac69856dbc1385eb1522cba4
regress/unittests/utf8/tests.c