summaryrefslogtreecommitdiff
path: root/monitor_wrap.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-10-02 19:33:20 +0000
committerDamien Miller <djm@mindrot.org>2017-10-03 06:34:26 +1100
commit66bf74a92131b7effe49fb0eefe5225151869dc5 (patch)
tree71a79e03a25a2381339989d22baaa5862f877b7a /monitor_wrap.c
parentd63b38160a59039708fd952adc75a0b3da141560 (diff)
upstream commit
Fix PermitOpen crash; spotted by benno@, ok dtucker@ deraadt@ Upstream-ID: c2cc84ffac070d2e1ff76182c70ca230a387983c
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 287af0667..69212aaf3 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_wrap.c,v 1.93 2017/09/12 06:32:07 djm Exp $ */ 1/* $OpenBSD: monitor_wrap.c,v 1.94 2017/10/02 19:33:20 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -290,10 +290,16 @@ out:
290 for (i = 0; i < newopts->nx; i++) \ 290 for (i = 0; i < newopts->nx; i++) \
291 newopts->x[i] = buffer_get_string(&m, NULL); \ 291 newopts->x[i] = buffer_get_string(&m, NULL); \
292 } while (0) 292 } while (0)
293#define M_CP_STRARRAYOPT_ALLOC(x, nx) do { \
294 newopts->x = newopts->nx == 0 ? \
295 NULL : xcalloc(newopts->nx, sizeof(*newopts->x)); \
296 M_CP_STRARRAYOPT(x, nx); \
297 } while (0)
293 /* See comment in servconf.h */ 298 /* See comment in servconf.h */
294 COPY_MATCH_STRING_OPTS(); 299 COPY_MATCH_STRING_OPTS();
295#undef M_CP_STROPT 300#undef M_CP_STROPT
296#undef M_CP_STRARRAYOPT 301#undef M_CP_STRARRAYOPT
302#undef M_CP_STRARRAYOPT_ALLOC
297 303
298 copy_set_server_options(&options, newopts, 1); 304 copy_set_server_options(&options, newopts, 1);
299 log_change_level(options.log_level); 305 log_change_level(options.log_level);