summaryrefslogtreecommitdiff
path: root/accel-pptpd/extra
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-12-02 20:06:03 +0300
committerKozlov Dmitry <dima@server>2010-12-02 20:06:03 +0300
commit0984abada7f7c38510f953a65a8449e8481140dc (patch)
tree29d10a8637773cd9bbbfceacf5fc1a7b5e930ce7 /accel-pptpd/extra
parentfd3509f7c4e9052a4e856b9a008c74df3abbe136 (diff)
downloadaccel-ppp-0984abada7f7c38510f953a65a8449e8481140dc.tar.gz
accel-ppp-0984abada7f7c38510f953a65a8449e8481140dc.zip
pppd_compat: fixed incorrect array size
Diffstat (limited to 'accel-pptpd/extra')
-rw-r--r--accel-pptpd/extra/pppd_compat.c8
-rw-r--r--accel-pptpd/extra/sigchld.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/accel-pptpd/extra/pppd_compat.c b/accel-pptpd/extra/pppd_compat.c
index 97a89d05..07ff0751 100644
--- a/accel-pptpd/extra/pppd_compat.c
+++ b/accel-pptpd/extra/pppd_compat.c
@@ -172,8 +172,8 @@ static void ev_ppp_started(struct ppp_t *ppp)
pid_t pid;
char *argv[8];
char *env[2];
- char ipaddr[16];
- char peer_ipaddr[16];
+ char ipaddr[17];
+ char peer_ipaddr[17];
char peername[64];
struct pppd_compat_pd_t *pd = find_pd(ppp);
@@ -234,8 +234,8 @@ static void ev_ppp_finished(struct ppp_t *ppp)
pid_t pid;
char *argv[8];
char *env[5];
- char ipaddr[16];
- char peer_ipaddr[16];
+ char ipaddr[17];
+ char peer_ipaddr[17];
char peername[64];
char connect_time[24];
char bytes_sent[24];
diff --git a/accel-pptpd/extra/sigchld.c b/accel-pptpd/extra/sigchld.c
index 240b0ddb..abfd42f1 100644
--- a/accel-pptpd/extra/sigchld.c
+++ b/accel-pptpd/extra/sigchld.c
@@ -57,13 +57,13 @@ static void* sigchld_thread(void *arg)
list_for_each_entry(h, &handlers, entry) {
if (h->pid == pid) {
h0 = h;
+ list_del(&h0->entry);
pthread_mutex_lock(&h0->lock);
break;
}
}
pthread_mutex_unlock(&handlers_lock);
if (h0) {
- list_del(&h0->entry);
h0->handler(h0, WEXITSTATUS(status));
h0->pid = 0;
pthread_mutex_unlock(&h0->lock);