Skip to content

Commit 7320a3d

Browse files
author
Ian Pye
committed
Tightening up what values are decoded
1 parent 8de8353 commit 7320a3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stream/source/unixgram/unixgram.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (src *UnixgramSource) decodeNginxLog(log []byte) int {
4040
writeChar[0] = log[readIndex]
4141

4242
if len(log)-4 > readIndex &&
43-
log[readIndex] == '\\' && log[readIndex+1] == 'x' && (log[readIndex+2] == '2' || log[readIndex+2] == '5') {
43+
log[readIndex] == '\\' && log[readIndex+1] == 'x' && ((log[readIndex+2] == '2' && log[readIndex+3] == '2') || (log[readIndex+2] == '5' && log[readIndex+3] == 'C')) {
4444
hex.Decode(writeChar[:], log[readIndex+2:readIndex+4])
4545
readIndex += 3
4646
}

0 commit comments

Comments
 (0)