summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-06 21:27:58 +0200
committerChristian Grothoff <christian@grothoff.org>2017-10-06 21:27:58 +0200
commitdc883f8556f34b324dd7677ab21c3d2840fd38a9 (patch)
treee74d3120e6dc7b31a18b7970a03d6ac7f0d25cf3 /src
parent8f08e4634f0e2cb61d288ecc061d75e78c27fd30 (diff)
downloadexchange-dc883f8556f34b324dd7677ab21c3d2840fd38a9.tar.gz
exchange-dc883f8556f34b324dd7677ab21c3d2840fd38a9.tar.bz2
exchange-dc883f8556f34b324dd7677ab21c3d2840fd38a9.zip
add assertion to be more defensive against buffer overflow (cannot happen, but this better protects against future changes)
Diffstat (limited to 'src')
-rw-r--r--src/exchange-lib/exchange_api_refresh_link.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/exchange-lib/exchange_api_refresh_link.c b/src/exchange-lib/exchange_api_refresh_link.c
index 5b2286e6..ca556688 100644
--- a/src/exchange-lib/exchange_api_refresh_link.c
+++ b/src/exchange-lib/exchange_api_refresh_link.c
@@ -235,6 +235,7 @@ parse_refresh_link_ok (struct TALER_EXCHANGE_RefreshLinkHandle *rlh,
/* decode all coins */
for (i=0;i<json_array_size (jsona);i++)
{
+ GNUNET_assert (i + off_coin < num_coins);
if (GNUNET_OK !=
parse_refresh_link_coin (rlh,
json_array_get (jsona,