From ecddae64a2e3b052c678427f708c949775dfc094 Mon Sep 17 00:00:00 2001 From: David Hankins Date: Fri, 29 Aug 2008 17:48:57 +0000 Subject: - The v6 BSD socket method was updated to use a single UDP BSD socket no matter how many interfaces are involved, differentiating the interfaces the packets were received on by the interface index supplied by the OS. - The relay agent no longer listens to the All DHCP Servers Multicast address. - A bug was fixed in data_string_sprintfa() where va_start was only called once for two invocations of vsprintf() variants. [ISC-Bugs #17610b] --- common/tree.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/tree.c') diff --git a/common/tree.c b/common/tree.c index aa5903af..5244a196 100644 --- a/common/tree.c +++ b/common/tree.c @@ -99,6 +99,7 @@ data_string_sprintfa(struct data_string *ds, const char *fmt, ...) { */ va_start(args, fmt); vsnprintf_ret = vsnprintf((char *)ds->data+cur_strlen, max, fmt, args); + va_end(args); /* INSIST(vsnprintf_ret >= 0); */ /* @@ -127,7 +128,11 @@ data_string_sprintfa(struct data_string *ds, const char *fmt, ...) { return 0; } memcpy(tmp_buffer->data, ds->data, cur_strlen); + + /* Rerun the vsprintf. */ + va_start(args, fmt); vsprintf((char *)tmp_buffer->data + cur_strlen, fmt, args); + va_end(args); /* * Replace our old buffer with the new buffer. @@ -138,7 +143,6 @@ data_string_sprintfa(struct data_string *ds, const char *fmt, ...) { ds->data = ds->buffer->data; ds->len = new_len; } - va_end(args); return 1; } -- cgit v1.2.1