Module: kamailio Branch: master Commit: 586ddc6ed3a2b757ad55fb9eb859945b279c415c URL: https://github.com/kamailio/kamailio/commit/586ddc6ed3a2b757ad55fb9eb859945b...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-12-18T11:18:21+01:00
presence_xml: check for number of read values
---
Modified: src/modules/presence_xml/pidf.c
---
Diff: https://github.com/kamailio/kamailio/commit/586ddc6ed3a2b757ad55fb9eb859945b... Patch: https://github.com/kamailio/kamailio/commit/586ddc6ed3a2b757ad55fb9eb859945b...
---
diff --git a/src/modules/presence_xml/pidf.c b/src/modules/presence_xml/pidf.c index 09d11438a0a..b9c85c65466 100644 --- a/src/modules/presence_xml/pidf.c +++ b/src/modules/presence_xml/pidf.c @@ -181,7 +181,7 @@ time_t xml_parse_dateTime(char *xml_time_str)
p++;
- if(sscanf(p, "%c%c:%c%c", &h1, &h2, &m1, &m2) < 0) { + if(sscanf(p, "%c%c:%c%c", &h1, &h2, &m1, &m2) < 4) { printf("error: failed to parse time\n"); return 0; }