Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ otherwise no tag is added. {issue}42208[42208] {pull}42403[42403]
- Reset EventLog if error EOF is encountered. {pull}42826[42826]
- Implement backoff on error retrial. {pull}42826[42826]
- Fix boolean key in security pipelines and sync pipelines with integration. {pull}43027[43027]
- Fix EvtVarTypeAnsiString conversion {pull}44026[44026]


*Elastic Logging Plugin*
Expand Down
5 changes: 4 additions & 1 deletion winlogbeat/sys/strings_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package sys

import (
"bytes"
"sync"

"golang.org/x/sys/windows"
Expand Down Expand Up @@ -48,6 +49,8 @@ func initANSIDecoder() *encoding.Decoder {
}

func ANSIBytesToString(enc []byte) (string, error) {
out, err := getCachedANSIDecoder().Bytes(enc)
// Trim to the null terminator
prefix, _, _ := bytes.Cut(enc, []byte("\x00"))
out, err := getCachedANSIDecoder().Bytes(prefix)
return string(out), err
}