Skip to content

Commit fe132bd

Browse files
authored
fix: prevent nil pointer dereference in envoyGoFilterOnHttpData (#18)
1 parent 3fe314c commit fe132bd

File tree

1 file changed

+1
-1
lines changed
  • contrib/golang/filters/http/source/go/pkg/http

1 file changed

+1
-1
lines changed

contrib/golang/filters/http/source/go/pkg/http/shim.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func envoyGoFilterOnHttpHeader(s *C.processState, endStream, headerNum, headerBy
236236

237237
//export envoyGoFilterOnHttpData
238238
func envoyGoFilterOnHttpData(s *C.processState, endStream, buffer, length uint64) uint64 {
239-
state := getState(s)
239+
state := getOrCreateState(s)
240240

241241
req := state.request
242242
if req.pInfo.paniced {

0 commit comments

Comments
 (0)