View | Details | Raw Unified | Return to bug 17136
Collapse All | Expand All

(-)dhcpcd-3.0.17.orig/configure.c (-2 / +2 lines)
Lines 137-145 Link Here
137
137
138
	if (f) {
138
	if (f) {
139
		fprintf (f, "# Generated by dhcpcd for interface %s\n", ifname);
139
		fprintf (f, "# Generated by dhcpcd for interface %s\n", ifname);
140
		if (dhcp->dnssearch)
140
		if (dhcp->dnssearch && *dhcp->dnssearch)
141
			fprintf (f, "search %s\n", dhcp->dnssearch);
141
			fprintf (f, "search %s\n", dhcp->dnssearch);
142
		else if (dhcp->dnsdomain) {
142
		else if (dhcp->dnsdomain && *dhcp->dnsdomain) {
143
			fprintf (f, "search %s\n", dhcp->dnsdomain);
143
			fprintf (f, "search %s\n", dhcp->dnsdomain);
144
		}
144
		}
145
145
(-)dhcpcd-3.0.17.orig/dhcp.c (-1 / +3 lines)
Lines 589-594 Link Here
589
589
590
#define GETSTR(_var) \
590
#define GETSTR(_var) \
591
				MIN_LENGTH (sizeof (char)); \
591
				MIN_LENGTH (sizeof (char)); \
592
				if (*(char*)p == '\0') continue; \
592
				if (_var) free (_var); \
593
				if (_var) free (_var); \
593
				_var = xmalloc (length + 1); \
594
				_var = xmalloc (length + 1); \
594
				memcpy (_var, p, length); \
595
				memcpy (_var, p, length); \
Lines 632-638 Link Here
632
				MIN_LENGTH (1);
633
				MIN_LENGTH (1);
633
				if (dhcp->dnssearch)
634
				if (dhcp->dnssearch)
634
					free (dhcp->dnssearch);
635
					free (dhcp->dnssearch);
635
				if ((len = decode_search (p, length, NULL)) > 0) {
636
				/* FIXME: decode_search() also reserves space for '\0' */
637
				if ((len = decode_search (p, length, NULL)) > 1) {
636
					dhcp->dnssearch = xmalloc (len);
638
					dhcp->dnssearch = xmalloc (len);
637
					decode_search (p, length, dhcp->dnssearch);
639
					decode_search (p, length, dhcp->dnssearch);
638
				}
640
				}
(-)dhcpcd-3.0.17.orig/interface.c (-1 / +1 lines)
Lines 142-148 Link Here
142
	if (! ifname)
142
	if (! ifname)
143
		return NULL;
143
		return NULL;
144
144
145
	memset (hwaddr, sizeof (hwaddr), 0);
145
	memset (hwaddr, 0, sizeof (hwaddr));
146
146
147
#ifndef __linux__
147
#ifndef __linux__
148
	if (getifaddrs (&ifap) != 0)
148
	if (getifaddrs (&ifap) != 0)

Return to bug 17136