From 9b16c8b0f6c3b6310e303411421bfcb16b26c3c4 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Tue, 31 Jul 2012 20:21:43 +0000 Subject: Clean up and ensure proper usage of alloca() This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/tcptls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/tcptls.c') diff --git a/main/tcptls.c b/main/tcptls.c index 81972651e..2ad3a10e4 100644 --- a/main/tcptls.c +++ b/main/tcptls.c @@ -71,7 +71,7 @@ static HOOK_T ssl_read(void *cookie, char *buf, LEN_T len) static HOOK_T ssl_write(void *cookie, const char *buf, LEN_T len) { #if 0 - char *s = alloca(len+1); + char *s = ast_alloca(len+1); strncpy(s, buf, len); s[len] = '\0'; -- cgit v1.2.3