• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/ucode/tests/custom/99_bugs/38_index_segfault

  1 When index() or rindex() was invoked with a string haystack and a non-
  2 string needle argument, a segmentation fault occurred due to an internal
  3 strlen() invocation on a NULL pointer.
  4 
  5 -- Testcase --
  6 print(index("abc", []), "\n")
  7 -- End --
  8 
  9 -- Args --
 10 -R
 11 -- End --
 12 
 13 -- Expect stdout --
 14 -1
 15 -- End --
 16 
 17 
 18 -- Testcase --
 19 print(rindex("abc", []), "\n")
 20 -- End --
 21 
 22 -- Args --
 23 -R
 24 -- End --
 25 
 26 -- Expect stdout --
 27 -1
 28 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt