From 5fe140babcbec90ddcbd9a6517c3f5e76844a9e9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 15 Jul 2006 10:55:24 +0000 Subject: r17060: Some c++ warnings (This used to be commit 2e7afa9e19b117d7a8ce1238c1b9b80ececec729) --- source3/libsmb/asn1.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c index 544ee78d40..dd22051ae7 100644 --- a/source3/libsmb/asn1.c +++ b/source3/libsmb/asn1.c @@ -31,7 +31,8 @@ BOOL asn1_write(ASN1_DATA *data, const void *p, int len) { if (data->has_error) return False; if (data->length < data->ofs+len) { - data->data = SMB_REALLOC(data->data, data->ofs+len); + data->data = SMB_REALLOC_ARRAY(data->data, unsigned char, + data->ofs+len); if (!data->data) { data->has_error = True; return False; @@ -213,7 +214,7 @@ BOOL asn1_check_BOOLEAN(ASN1_DATA *data, BOOL v) BOOL asn1_load(ASN1_DATA *data, DATA_BLOB blob) { ZERO_STRUCTP(data); - data->data = memdup(blob.data, blob.length); + data->data = (unsigned char *)memdup(blob.data, blob.length); if (!data->data) { data->has_error = True; return False; @@ -405,7 +406,7 @@ BOOL asn1_read_GeneralString(ASN1_DATA *data, char **s) data->has_error = True; return False; } - str = SMB_MALLOC(len+1); + str = SMB_MALLOC_ARRAY(char, len+1); if (!str) { data->has_error = True; return False; -- cgit