Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 586138 Details for
Bug 691426
>=net-misc/dhcpcd-8.0.0 aborts on net.eno startup when running IPv6 scripts
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix the issue
dhcpcd-fix.diff (text/plain), 1.75 KB, created by
Roy Marples
on 2019-08-08 15:35:40 UTC
(
hide
)
Description:
Fix the issue
Filename:
MIME Type:
Creator:
Roy Marples
Created:
2019-08-08 15:35:40 UTC
Size:
1.75 KB
patch
obsolete
>diff --git a/src/dhcp-common.c b/src/dhcp-common.c >index 08ab9493..9f556557 100644 >--- a/src/dhcp-common.c >+++ b/src/dhcp-common.c >@@ -645,14 +645,16 @@ print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt, > if (fputc('=', fp) == EOF) > return -1; > if (dl == 0) >- return 1; >+ goto out; > > if (opt->type & OT_RFC1035) { > char domain[NS_MAXDNAME]; > > sl = decode_rfc1035(domain, sizeof(domain), data, dl); >- if (sl == 0 || sl == -1) >- return sl; >+ if (sl == -1) >+ return -1; >+ if (sl == 0) >+ goto out; > if (valid_domainname(domain, opt->type) == -1) > return -1; > return efprintf(fp, "%s", domain); >@@ -693,9 +695,7 @@ print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt, > return -1; > } > } >- if (fputc('\0', fp) == EOF) >- return -1; >- return 1; >+ goto out; > } > > t = data; >@@ -760,6 +760,7 @@ print_option(FILE *fp, const char *prefix, const struct dhcp_opt *opt, > } > } > >+out: > if (fputc('\0', fp) == EOF) > return -1; > return 1; >diff --git a/src/script.c b/src/script.c >index 74aef1b1..3dee7b08 100644 >--- a/src/script.c >+++ b/src/script.c >@@ -33,6 +33,7 @@ > #include <netinet/in.h> > #include <arpa/inet.h> > >+#include <assert.h> > #include <ctype.h> > #include <errno.h> > #include <signal.h> >@@ -477,12 +478,21 @@ dumplease: > fp = NULL; > #endif > >+ /* Count the terminated env strings. >+ * assert that the terminations are correct. */ > nenv = 0; > endp = buf + buf_pos; > for (bufp = buf; bufp < endp; bufp++) { >- if (*bufp == '\0') >+ if (*bufp == '\0') { >+#ifndef NDEBUG >+ if (bufp + 1 < endp) >+ assert(*(bufp + 1) != '\0'); >+#endif > nenv++; >+ } > } >+ assert(*--bufp == '\0'); >+ > if (ctx->script_envlen < nenv) { > env = reallocarray(ctx->script_env, nenv + 1, sizeof(*env)); > if (env == NULL)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 691426
:
585736
|
585740
|
585742
|
585750
|
585758
|
585766
|
585976
|
586102
|
586106
|
586108
|
586110
|
586126
|
586130
|
586132
| 586138