From e33ad0f1875349ef73a89aad2473594de21ad9c0 Mon Sep 17 00:00:00 2001 From: Shankara Pailoor Date: Fri, 28 Dec 2018 06:05:56 -0800 Subject: 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. --- tools/syz-trace2syz/parser/lex.go | 1 - 1 file changed, 1 deletion(-) (limited to 'tools/syz-trace2syz/parser/lex.go') 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) } -- cgit mrf-deployment