diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-01-28 16:14:31 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-01-31 11:35:53 +0100 |
| commit | 8e579f27d6d48260d8d52d56da3e08b1ed81bdd4 (patch) | |
| tree | 695b21a4e110a73b0cd81476b23fb33bd7f33e5c /sys | |
| parent | aa432daf55aba3936abb40d197956ccdba8b2085 (diff) | |
prog: fix escaping of C strings
C's \xHH hex constants in strings accept any number of hex digits
(not just 2 or 4). So later non-hex escaped chars glue to the \x construct.
Use \OOO instead as it accepts at most 3 octal digits.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/test/test/strings | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/test/test/strings b/sys/test/test/strings index 5b665ba5a..19af70fd7 100644 --- a/sys/test/test/strings +++ b/sys/test/test/strings @@ -1,3 +1,4 @@ syz_compare(&AUTO="303100090a0d7022273a", 0xa, &AUTO=@str='01\x00\t\n\rp\"\':', AUTO) syz_compare(&AUTO="303100090a0d7022273a01", 0xb, &AUTO=@blob='01\x00\t\n\rp\"\':\x01', AUTO) syz_compare(&AUTO="303100090a0d7022273a0102", 0xc, &AUTO=@arr16be=[0x3031, 0x0009, 0x0a0d, 0x7022, 0x273a, 0x0102], AUTO) +syz_compare(&AUTO="e91f6189591e9233614b00", 0xb, &AUTO=@str='\xe9\x1fa\x89Y\x1e\x923aK\x00', AUTO) |
