[libxslt] Don't allow empty durations



commit 5589b3688cd2bd15a0cfdfd78d1efd2b22ae931e
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Jun 22 13:28:17 2020 +0200

    Don't allow empty durations
    
    "However, at least one number and its designator must be present."

 libexslt/date.c | 3 +++
 1 file changed, 3 insertions(+)
---
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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]