summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/readconf.c b/readconf.c
index 9e15f27bb..66090e305 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.233 2015/03/30 00:00:29 djm Exp $ */ 1/* $OpenBSD: readconf.c,v 1.234 2015/04/24 01:36:00 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -295,7 +295,7 @@ add_local_forward(Options *options, const struct Forward *newfwd)
295 newfwd->listen_path == NULL) 295 newfwd->listen_path == NULL)
296 fatal("Privileged ports can only be forwarded by root."); 296 fatal("Privileged ports can only be forwarded by root.");
297#endif 297#endif
298 options->local_forwards = xrealloc(options->local_forwards, 298 options->local_forwards = xreallocarray(options->local_forwards,
299 options->num_local_forwards + 1, 299 options->num_local_forwards + 1,
300 sizeof(*options->local_forwards)); 300 sizeof(*options->local_forwards));
301 fwd = &options->local_forwards[options->num_local_forwards++]; 301 fwd = &options->local_forwards[options->num_local_forwards++];
@@ -318,7 +318,7 @@ add_remote_forward(Options *options, const struct Forward *newfwd)
318{ 318{
319 struct Forward *fwd; 319 struct Forward *fwd;
320 320
321 options->remote_forwards = xrealloc(options->remote_forwards, 321 options->remote_forwards = xreallocarray(options->remote_forwards,
322 options->num_remote_forwards + 1, 322 options->num_remote_forwards + 1,
323 sizeof(*options->remote_forwards)); 323 sizeof(*options->remote_forwards));
324 fwd = &options->remote_forwards[options->num_remote_forwards++]; 324 fwd = &options->remote_forwards[options->num_remote_forwards++];