summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/krb5/crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/krb5/crypto.c')
-rw-r--r--source4/heimdal/lib/krb5/crypto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/heimdal/lib/krb5/crypto.c b/source4/heimdal/lib/krb5/crypto.c
index 3cfc780eb4..039484c650 100644
--- a/source4/heimdal/lib/krb5/crypto.c
+++ b/source4/heimdal/lib/krb5/crypto.c
@@ -32,7 +32,7 @@
*/
#include "krb5_locl.h"
-RCSID("$Id: crypto.c,v 1.132 2006/02/28 14:52:57 lha Exp $");
+RCSID("$Id: crypto.c,v 1.133 2006/03/07 19:34:55 lha Exp $");
#undef CRYPTO_DEBUG
#ifdef CRYPTO_DEBUG
@@ -3414,7 +3414,7 @@ decrypt_internal_derived(krb5_context context,
l = len - et->confoundersize;
memmove(p, p + et->confoundersize, l);
result->data = realloc(p, l);
- if(result->data == NULL) {
+ if(result->data == NULL && l != 0) {
free(p);
krb5_set_error_string(context, "malloc: out of memory");
return ENOMEM;
@@ -3479,7 +3479,7 @@ decrypt_internal(krb5_context context,
l = len - et->confoundersize - checksum_sz;
memmove(p, p + et->confoundersize + checksum_sz, l);
result->data = realloc(p, l);
- if(result->data == NULL) {
+ if(result->data == NULL && l != 0) {
free(p);
krb5_set_error_string(context, "malloc: out of memory");
return ENOMEM;
@@ -3523,7 +3523,7 @@ decrypt_internal_special(krb5_context context,
memmove (p, p + cksum_sz + et->confoundersize, sz);
result->data = realloc(p, sz);
- if(result->data == NULL) {
+ if(result->data == NULL && sz != 0) {
free(p);
krb5_set_error_string(context, "malloc: out of memory");
return ENOMEM;