In cmd/sshproxy/recorder.go, the Splitter.Write method might send records with duplicated data, in the case where partial writes are happening on the underlying file, because Splitter.Write doesn't check how much data is effectively written. If the write doesn't happen at once, the successive writes of the remaining bytes will be sent again as new records.
|
// Write implements the Writer Write method. It sends a copy of the written |
|
// slice to its internal channel. |
|
func (s *Splitter) Write(p []byte) (int, error) { |
|
pp := Dup(p, len(p)) |
|
s.ch <- record.Record{ |
|
Time: time.Now(), |
|
Fd: s.fd, |
|
Size: len(p), |
|
Data: pp, |
|
} |
|
return s.f.Write(p) |
|
} |
In cmd/sshproxy/recorder.go, the
Splitter.Writemethod might send records with duplicated data, in the case where partial writes are happening on the underlying file, becauseSplitter.Writedoesn't check how much data is effectively written. If the write doesn't happen at once, the successive writes of the remaining bytes will be sent again as new records.sshproxy/cmd/sshproxy/recorder.go
Lines 70 to 81 in 7239859