summaryrefslogtreecommitdiff
path: root/lib/gnutls_buffers.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-04-17 11:41:17 +0200
committerSimon Josefsson <simon@josefsson.org>2008-04-17 11:41:17 +0200
commit595b45ed9162701d8b62e301afaebbee56cbb138 (patch)
tree5de9632f97fb788696586b05edffd9947b3182db /lib/gnutls_buffers.c
parent37f27eeb6694288d1985eb89c3fa1f4d0fc6c3e6 (diff)
downloadgnutls-595b45ed9162701d8b62e301afaebbee56cbb138.tar.gz
Remove all uses of gnutls_alloca/gnutls_afree.
Use normal gnutls_malloc instead. One reason is increased portability to Windows, the other is that several of the uses may be unsafe because the size of data allocated could be large. Reported by Massimo Gaspari <massimo.gaspari@alice.it> in <http://permalink.gmane.org/gmane.network.gnutls.general/1170>.
Diffstat (limited to 'lib/gnutls_buffers.c')
-rw-r--r--lib/gnutls_buffers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index 689779b422..2caf266599 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -430,7 +430,7 @@ _gnutls_io_clear_peeked_data (gnutls_session_t session)
if (session->internals.have_peeked_data == 0 || RCVLOWAT == 0)
return 0;
- peekdata = gnutls_alloca (RCVLOWAT);
+ peekdata = gnutls_malloc (RCVLOWAT);
if (peekdata == NULL)
{
gnutls_assert ();
@@ -448,7 +448,7 @@ _gnutls_io_clear_peeked_data (gnutls_session_t session)
while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN
|| sum < RCVLOWAT);
- gnutls_afree (peekdata);
+ gnutls_free (peekdata);
if (ret < 0)
{