diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-10-02 19:33:20 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-10-03 06:34:26 +1100 |
commit | 66bf74a92131b7effe49fb0eefe5225151869dc5 (patch) | |
tree | 71a79e03a25a2381339989d22baaa5862f877b7a /monitor_wrap.c | |
parent | d63b38160a59039708fd952adc75a0b3da141560 (diff) | |
download | openssh-git-66bf74a92131b7effe49fb0eefe5225151869dc5.tar.gz |
upstream commitV_7_6_P1
Fix PermitOpen crash; spotted by benno@, ok dtucker@ deraadt@
Upstream-ID: c2cc84ffac070d2e1ff76182c70ca230a387983c
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index 287af066..69212aaf 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.93 2017/09/12 06:32:07 djm Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.94 2017/10/02 19:33:20 djm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * Copyright 2002 Markus Friedl <markus@openbsd.org> @@ -290,10 +290,16 @@ out: for (i = 0; i < newopts->nx; i++) \ newopts->x[i] = buffer_get_string(&m, NULL); \ } while (0) +#define M_CP_STRARRAYOPT_ALLOC(x, nx) do { \ + newopts->x = newopts->nx == 0 ? \ + NULL : xcalloc(newopts->nx, sizeof(*newopts->x)); \ + M_CP_STRARRAYOPT(x, nx); \ + } while (0) /* See comment in servconf.h */ COPY_MATCH_STRING_OPTS(); #undef M_CP_STROPT #undef M_CP_STRARRAYOPT +#undef M_CP_STRARRAYOPT_ALLOC copy_set_server_options(&options, newopts, 1); log_change_level(options.log_level); |