summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-03-10 12:37:12 +0100
committerChristian Grothoff <christian@grothoff.org>2024-03-10 12:37:24 +0100
commitdc26c14f4cf0beb83d8eef28baf84b56c8d3ef86 (patch)
tree52fa2b36d10a0461b30cca0c4e3674c7055c5b96
parent904a15eec6884f049d70dfdb7043f8aed3bbebc0 (diff)
downloadexchange-dc26c14f4cf0beb83d8eef28baf84b56c8d3ef86.tar.gz
exchange-dc26c14f4cf0beb83d8eef28baf84b56c8d3ef86.tar.bz2
exchange-dc26c14f4cf0beb83d8eef28baf84b56c8d3ef86.zip
do not permit empty currency string
-rw-r--r--src/util/Makefile.am2
-rw-r--r--src/util/amount.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 0edae9506..2aea6b689 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -120,7 +120,7 @@ libtalerutil_la_LIBADD = \
-lm
libtalerutil_la_LDFLAGS = \
- -version-info 3:0:2 \
+ -version-info 3:1:2 \
-no-undefined
diff --git a/src/util/amount.c b/src/util/amount.c
index ee50a9bca..cce84d73a 100644
--- a/src/util/amount.c
+++ b/src/util/amount.c
@@ -87,6 +87,7 @@ TALER_string_to_amount (const char *str,
/* parse currency */
colon = strchr (str, (int) ':');
if ( (NULL == colon) ||
+ (colon == str) ||
((colon - str) >= TALER_CURRENCY_LEN) )
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,