From: Markus Teich Date: Thu, 12 Jan 2017 19:16:40 +0000 (+0100) Subject: auction: check for empty pricelist X-Git-Tag: taler-0.2.1~454 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9006be70fd75641136a5a230f613498d5082bb3d;p=oweals%2Fgnunet.git auction: check for empty pricelist --- diff --git a/src/auction/gnunet-auction-create.c b/src/auction/gnunet-auction-create.c index dc43f635e..a4c029572 100644 --- a/src/auction/gnunet-auction-create.c +++ b/src/auction/gnunet-auction-create.c @@ -113,6 +113,11 @@ run (void *cls, "could not get `prices` array node from pricemap\n"); goto fail; } + if (0 == json_array_size (parray)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "empty pricemap array\n"); + goto fail; + } json_array_foreach (parray, i, pnode) { if (-1 == json_unpack_ex (pnode, &jerr, 0, "F", &cur))