summaryrefslogtreecommitdiff
path: root/xmalloc.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 /xmalloc.c
parentef39e8c0497ff0564990a4f9e8b7338b3ba3507c (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 'xmalloc.c')
-rw-r--r--xmalloc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xmalloc.c b/xmalloc.c
index 98cbf8776..dea9dd9fe 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: xmalloc.c,v 1.32 2015/04/24 01:36:01 deraadt Exp $ */ 1/* $OpenBSD: xmalloc.c,v 1.33 2016/02/15 09:47:49 dtucker 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
@@ -26,6 +26,14 @@
26#include "xmalloc.h" 26#include "xmalloc.h"
27#include "log.h" 27#include "log.h"
28 28
29void
30ssh_malloc_init(void)
31{
32 extern char *malloc_options;
33
34 malloc_options = "S";
35}
36
29void * 37void *
30xmalloc(size_t size) 38xmalloc(size_t size)
31{ 39{