diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2016-02-15 09:47:49 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-02-16 10:44:00 +1100 |
commit | ffb1e7e896139a42ceb78676f637658f44612411 (patch) | |
tree | aba9407fda7b5ee62e4562c79886450f7125f593 /sftp.c | |
parent | ef39e8c0497ff0564990a4f9e8b7338b3ba3507c (diff) |
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.c')
-rw-r--r-- | sftp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.171 2015/08/20 22:32:42 deraadt Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.172 2016/02/15 09:47:49 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -2248,6 +2248,7 @@ main(int argc, char **argv) | |||
2248 | size_t num_requests = DEFAULT_NUM_REQUESTS; | 2248 | size_t num_requests = DEFAULT_NUM_REQUESTS; |
2249 | long long limit_kbps = 0; | 2249 | long long limit_kbps = 0; |
2250 | 2250 | ||
2251 | ssh_malloc_init(); /* must be called before any mallocs */ | ||
2251 | /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ | 2252 | /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ |
2252 | sanitise_stdfd(); | 2253 | sanitise_stdfd(); |
2253 | setlocale(LC_CTYPE, ""); | 2254 | setlocale(LC_CTYPE, ""); |