Skip to content

Commit 4070f27

Browse files
committed
添加错误判断
1 parent 7fe8796 commit 4070f27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packet/ps_dec.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ func (dec *DecPSPackage) decPackHeader(data []byte) ([][]byte, error) {
4747
return nil, err
4848
}
4949
psl &= 0x07
50-
dec.Skip(int(psl))
50+
if err = dec.Skip(int(psl)); err != nil {
51+
return nil, err
52+
}
5153

5254
for {
5355
nextStartCode, err := dec.Uint32()

0 commit comments

Comments
 (0)