You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
hex2bin, str_pad and strtr accept inputs php rejects (empty pad, empty key, bad hex) #281
Three edge cases found while speeding up the string functions in #278; each currently differs from php, and none has a test.
hex2bin("abc") / hex2bin("zz"): php warns and returns false; ours silently drops the stray byte or reads a bad digit as 0. Manticore's rule is to throw where php warns.
str_pad("a", 5, ""): php 8 throws ValueError: str_pad(): Argument #3 ($pad_string) must be a non-empty string; ours returns the input.
strtr("abc", ["" => "x"]): php warns "Ignoring replacement of empty string"; ours skips it silently (consistent with the throw-where-php-warns rule, it should throw or at least match).
Fix each with a case in tests/aot/cases whose expected output is php's (or the exception message where php only warns).
Activity
hex2bin, str_pad and strtr reject what php rejects: ValueError for od…