aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-trace2syz/parser/lex.go
diff options
context:
space:
mode:
authorShankara Pailoor <shankarapailoor@gmail.com>2018-12-28 06:05:56 -0800
committerDmitry Vyukov <dvyukov@google.com>2018-12-28 15:18:24 +0100
commite33ad0f1875349ef73a89aad2473594de21ad9c0 (patch)
treeec93487ee366eb93f13e35dace9ad63f67d33901 /tools/syz-trace2syz/parser/lex.go
parent6a33670d2ffa859bd7180727ef641f425cc95120 (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/lex.go')
-rw-r--r--tools/syz-trace2syz/parser/lex.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/syz-trace2syz/parser/lex.go b/tools/syz-trace2syz/parser/lex.go
index c5a83df64..12df80674 100644
--- a/tools/syz-trace2syz/parser/lex.go
+++ b/tools/syz-trace2syz/parser/lex.go
@@ -5804,6 +5804,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)
}