summaryrefslogtreecommitdiff
path: root/sftp-server-main.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2016-02-15 09:47:49 +0000
committerDamien Miller <djm@mindrot.org>2016-02-16 10:44:00 +1100
commitffb1e7e896139a42ceb78676f637658f44612411 (patch)
treeaba9407fda7b5ee62e4562c79886450f7125f593 /sftp-server-main.c
parentef39e8c0497ff0564990a4f9e8b7338b3ba3507c (diff)
downloadopenssh-git-ffb1e7e896139a42ceb78676f637658f44612411.tar.gz
upstream commit
Add a function to enable security-related malloc_options. With and ok deraadt@, something similar has been in the snaps for a while. Upstream-ID: 43a95523b832b7f3b943d2908662191110c380ed
Diffstat (limited to 'sftp-server-main.c')
-rw-r--r--sftp-server-main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sftp-server-main.c b/sftp-server-main.c
index 7e644ab8..c6ccd623 100644
--- a/sftp-server-main.c
+++ b/sftp-server-main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-server-main.c,v 1.4 2009/02/21 19:32:04 tobias Exp $ */
+/* $OpenBSD: sftp-server-main.c,v 1.5 2016/02/15 09:47:49 dtucker Exp $ */
/*
* Copyright (c) 2008 Markus Friedl. All rights reserved.
*
@@ -26,6 +26,7 @@
#include "log.h"
#include "sftp.h"
#include "misc.h"
+#include "xmalloc.h"
void
cleanup_exit(int i)
@@ -38,6 +39,7 @@ main(int argc, char **argv)
{
struct passwd *user_pw;
+ ssh_malloc_init(); /* must be called before any mallocs */
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();