diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-09 15:49:29 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-09 15:49:38 +0200 |
commit | dccb300b76fbf35ced3bb6b8becbfc2ba98407cc (patch) | |
tree | bf9c6875a8dd433ed6a488302fb00d92ae2bc5aa /src | |
parent | 2844a9a7b3d8a81a2f3dda182bdee514b205d977 (diff) |
enforce proper URL limit (#6172)
Diffstat (limited to 'src')
-rw-r--r-- | src/bank-lib/bank_api_transfer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bank-lib/bank_api_transfer.c b/src/bank-lib/bank_api_transfer.c index 0cf59602e..5ec747605 100644 --- a/src/bank-lib/bank_api_transfer.c +++ b/src/bank-lib/bank_api_transfer.c @@ -91,8 +91,9 @@ TALER_BANK_prepare_transfer ( size_t u_len = strlen (exchange_base_url) + 1; char *end; - if ( (d_len > (size_t) UINT32_MAX) || - (u_len > (size_t) UINT32_MAX) ) + if ( (d_len >= (size_t) GNUNET_MAX_MALLOC_CHECKED) || + (u_len >= (size_t) GNUNET_MAX_MALLOC_CHECKED) || + (d_len + u_len + sizeof (*wp) >= GNUNET_MAX_MALLOC_CHECKED) ) { GNUNET_break (0); /* that's some long URL... */ *buf = NULL; |