summaryrefslogtreecommitdiff
path: root/lib/gnutls_buffers.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-08-18 21:21:30 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-08-18 21:21:30 +0000
commit19a95fa5c2451a474c2c42188ae8332fd20032d1 (patch)
treeaa5974f83c664c227377b2414d50ae6c2c2aed64 /lib/gnutls_buffers.c
parent66de00f0d9ee21497913d5c11739a5b59216c72a (diff)
downloadgnutls-19a95fa5c2451a474c2c42188ae8332fd20032d1.tar.gz
several checks for failed allocations and other fixes
Diffstat (limited to 'lib/gnutls_buffers.c')
-rw-r--r--lib/gnutls_buffers.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index 2b1a22f4fc..20701b6458 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -43,7 +43,7 @@ int gnutls_insertDataBuffer(ContentType type, GNUTLS_STATE state, char *data, in
_gnutls_log( "RECORD BUFFER: Inserted %d bytes of Data(%d)\n", length, type);
#endif
state->gnutls_internals.buffer.data =
- gnutls_realloc(state->gnutls_internals.buffer.data,
+ gnutls_realloc_fast(state->gnutls_internals.buffer.data,
state->gnutls_internals.buffer.size);
memcpy(&state->gnutls_internals.buffer.data[old_buffer], data, length);
}
@@ -55,7 +55,7 @@ int gnutls_insertDataBuffer(ContentType type, GNUTLS_STATE state, char *data, in
_gnutls_log( "HANDSHAKE BUFFER: Inserted %d bytes of Data(%d)\n", length, type);
#endif
state->gnutls_internals.buffer_handshake.data =
- gnutls_realloc(state->gnutls_internals.buffer_handshake.data,
+ gnutls_realloc_fast(state->gnutls_internals.buffer_handshake.data,
state->gnutls_internals.buffer_handshake.size);
memcpy(&state->gnutls_internals.buffer_handshake.data[old_buffer], data, length);
}
@@ -106,7 +106,7 @@ int gnutls_getDataFromBuffer(ContentType type, GNUTLS_STATE state, char *data, i
&state->gnutls_internals.buffer.data[length],
state->gnutls_internals.buffer.size);
state->gnutls_internals.buffer.data =
- gnutls_realloc(state->gnutls_internals.buffer.data,
+ gnutls_realloc_fast(state->gnutls_internals.buffer.data,
state->gnutls_internals.buffer.size);
}
if (type == GNUTLS_HANDSHAKE) {
@@ -124,7 +124,7 @@ int gnutls_getDataFromBuffer(ContentType type, GNUTLS_STATE state, char *data, i
&state->gnutls_internals.buffer_handshake.data[length],
state->gnutls_internals.buffer_handshake.size);
state->gnutls_internals.buffer_handshake.data =
- gnutls_realloc(state->gnutls_internals.buffer_handshake.data,
+ gnutls_realloc_fast(state->gnutls_internals.buffer_handshake.data,
state->gnutls_internals.buffer_handshake.size);
}
@@ -272,7 +272,7 @@ int gnutls_insertHashDataBuffer( GNUTLS_STATE state, char *data, int length)
_gnutls_log( "HASH BUFFER: Inserted %d bytes of Data\n", length);
#endif
state->gnutls_internals.hash_buffer.data =
- gnutls_realloc(state->gnutls_internals.hash_buffer.data,
+ gnutls_realloc_fast(state->gnutls_internals.hash_buffer.data,
state->gnutls_internals.hash_buffer.size);
if (state->gnutls_internals.hash_buffer.data == NULL) {
@@ -305,7 +305,7 @@ int gnutls_getHashDataFromBuffer( GNUTLS_STATE state, char *data, int length)
&state->gnutls_internals.hash_buffer.data[length],
state->gnutls_internals.hash_buffer.size);
state->gnutls_internals.hash_buffer.data =
- gnutls_realloc(state->gnutls_internals.hash_buffer.data,
+ gnutls_realloc_fast(state->gnutls_internals.hash_buffer.data,
state->gnutls_internals.hash_buffer.size);
if (state->gnutls_internals.hash_buffer.data == NULL) {