diff options
Diffstat (limited to 'src/bank-lib')
-rw-r--r-- | src/bank-lib/bank_api_transfer.c | 5 |
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 45bbb46ee..c8fbe6908 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; |