summaryrefslogtreecommitdiff
path: root/src/bank-lib/bank_api_transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bank-lib/bank_api_transfer.c')
-rw-r--r--src/bank-lib/bank_api_transfer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bank-lib/bank_api_transfer.c b/src/bank-lib/bank_api_transfer.c
index 45bbb46e..c8fbe690 100644
--- a/src/bank-lib/bank_api_transfer.c
+++ b/src/bank-lib/bank_api_transfer.c
@@ -284,7 +284,10 @@ TALER_BANK_transfer (
}
d_len = ntohl (wp->account_len);
u_len = ntohl (wp->exchange_url_len);
- if (sizeof (*wp) + d_len + u_len != buf_size)
+ if ( (sizeof (*wp) + d_len + u_len != buf_size) ||
+ (d_len > buf_size) ||
+ (u_len > buf_size) ||
+ (d_len + u_len > buf_size) )
{
GNUNET_break (0);
return NULL;