summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2020-06-22 13:28:17 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2020-06-22 13:28:17 +0200
commit5589b3688cd2bd15a0cfdfd78d1efd2b22ae931e (patch)
treebb9806e2f9cd6b55f6a5fa15e3a7c7d115306590
parente68b39eaeee2c778b4ae5ceee399f80052e2936e (diff)
downloadlibxslt-5589b3688cd2bd15a0cfdfd78d1efd2b22ae931e.tar.gz
Don't allow empty durations
"However, at least one number and its designator must be present."
-rw-r--r--libexslt/date.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libexslt/date.c b/libexslt/date.c
index e3c86322..1ee5dbfc 100644
--- a/libexslt/date.c
+++ b/libexslt/date.c
@@ -1025,6 +1025,9 @@ exsltDateParseDuration (const xmlChar *duration)
if (*cur++ != 'P')
return NULL;
+ if (*cur == 0)
+ return NULL;
+
dur = exsltDateCreateDuration();
if (dur == NULL)
return NULL;