diff options
author | brian <brian@FreeBSD.org> | 2000-11-16 23:15:42 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-11-16 23:15:42 +0000 |
commit | 2607c6601d6c936076e2f20ee94c9525942d1868 (patch) | |
tree | 4897a40fb2b3c9bd175693b001866426fe57522b /libexec | |
parent | 5d83d171df44f3eeea633909f60d663b281955df (diff) | |
download | FreeBSD-src-2607c6601d6c936076e2f20ee94c9525942d1868.zip FreeBSD-src-2607c6601d6c936076e2f20ee94c9525942d1868.tar.gz |
Go back to populating data_len in struct ngpppoe_init_data.
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/pppoed/pppoed.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/pppoed/pppoed.c b/libexec/pppoed/pppoed.c index c82d305..aae546c 100644 --- a/libexec/pppoed/pppoed.c +++ b/libexec/pppoed/pppoed.c @@ -232,7 +232,8 @@ ConfigureNode(const char *prog, const char *iface, const char *provider, data = (struct ngpppoe_init_data *)alloca(sizeof *data + plen); snprintf(data->hook, sizeof data->hook, "%s", ngc->peerhook); - strcpy(data->data, provider); + memcpy(data->data, provider, plen); + data->data_len = plen; spath = (char *)alloca(strlen(ngc->peerhook) + 3); strcpy(spath, ".:"); @@ -324,7 +325,8 @@ Spawn(const char *prog, const char *acname, const char *exec, slen = strlen(acname); data = (struct ngpppoe_init_data *)alloca(sizeof *data + slen); snprintf(data->hook, sizeof data->hook, "%s", ngc.ourhook); - strcpy(data->data, acname); + memcpy(data->data, acname, slen); + data->data_len = slen; path = (char *)alloca(strlen(ngc.ourhook) + 3); strcpy(path, ".:"); |