1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-28 10:01:00 +03:00
Files
libxml2/test/XPath/expr/strings
Nick Wellnhofer 7482f41f61 Check for integer overflow in xmlXPathFormatNumber
Check for overflow before casting double to int.

Found with afl-fuzz and UBSan.
2017-06-01 22:00:19 +02:00

37 lines
920 B
Plaintext

string(5)
string(0.5)
string(-0.5)
string(true())
string(false())
string(12345678901234567890)
string(-12345678901234567890)
concat("titi","toto")
concat("titi","toto","tata")
concat("titi",'toto')
concat("titi",'toto',"tata","last")
starts-with("tititoto","titi")
starts-with("tititoto","to")
contains("tititototata","titi")
contains("tititototata","toto")
contains("tititototata","tata")
contains("tititototata","tita")
substring("12345",2,3)
substring("12345",2)
substring("12345",-4)
substring("12345",3.4)
substring("12345",3.6)
substring("12345",1.5,2.6)
substring("12345",2.2,2.2)
substring("12345",0,3)
substring("12345",-8,10)
substring("12345",4,-10)
substring("12345",0 div 0, 3)
substring("12345",1, 0 div 0)
substring("12345",1 div 0, 3)
substring("12345",3,-1 div 0)
substring("12345",-42, 1 div 0)
substring("12345",-1 div 0, 1 div 0)
substring("12345",-1 div 0,5)
string-length("")
string-length("titi")