projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cafbbb5
)
auction: check for empty pricelist
author
Markus Teich
<teichm@fs.tum.de>
Thu, 12 Jan 2017 19:16:40 +0000
(20:16 +0100)
committer
Markus Teich
<teichm@fs.tum.de>
Thu, 12 Jan 2017 19:18:09 +0000
(20:18 +0100)
src/auction/gnunet-auction-create.c
patch
|
blob
|
history
diff --git
a/src/auction/gnunet-auction-create.c
b/src/auction/gnunet-auction-create.c
index dc43f635ee45a7613812a29eb2e70a4e32f2f721..a4c0295725baba30d5e2ae6e3a69c0eec4a0a313 100644
(file)
--- 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))