diff options
author | schwarze@openbsd.org <schwarze@openbsd.org> | 2016-05-30 12:05:56 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-06-08 11:45:05 +1000 |
commit | 75f0844b4f29d62ec3a5e166d2ee94b02df819fc (patch) | |
tree | c58869d41e11844e2e86358b6c7cdb5a235c64f7 /PROTOCOL.mux | |
parent | 016881eb33a7948028848c90f4c7ac42e3af0e87 (diff) |
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
Diffstat (limited to 'PROTOCOL.mux')
0 files changed, 0 insertions, 0 deletions