diff options
| author | Shankara Pailoor <shankarapailoor@gmail.com> | 2018-12-28 06:05:56 -0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-28 15:18:24 +0100 |
| commit | e33ad0f1875349ef73a89aad2473594de21ad9c0 (patch) | |
| tree | ec93487ee366eb93f13e35dace9ad63f67d33901 /tools/syz-trace2syz/parser/straceLex.rl | |
| parent | 6a33670d2ffa859bd7180727ef641f425cc95120 (diff) | |
tools/syz-trace2syz: only add null-byte for prog.BufferFilename
trace2syz used to always add a null byte to strings.
This isn't correct behavior since we may end up writing null bytes to files.
The extra byte can affect system calls like ioctl FS_IOC_ENABLE_VERITY.
We now only add the byte for filenames.
Diffstat (limited to 'tools/syz-trace2syz/parser/straceLex.rl')
| -rw-r--r-- | tools/syz-trace2syz/parser/straceLex.rl | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/syz-trace2syz/parser/straceLex.rl b/tools/syz-trace2syz/parser/straceLex.rl index 9d5d4eaf5..d52446301 100644 --- a/tools/syz-trace2syz/parser/straceLex.rl +++ b/tools/syz-trace2syz/parser/straceLex.rl @@ -127,6 +127,5 @@ func ParseString(s string) string{ log.Logf(2, "failed to decode string: %s, with error: %s", s, err.Error()) decoded = []byte(strippedStr) } - decoded = append(decoded, '\x00') return string(decoded) } |
