mirror of https://bitbucket.org/ausocean/av.git
rtmp: check that len(buf) is not less than 4 before buf = buf[4:]
This commit is contained in:
parent
6da0967b80
commit
3d3ec6b893
|
@ -2188,6 +2188,9 @@ func C_RTMP_Write(r *C_RTMP, buf []byte) int {
|
|||
if ret == 0 {
|
||||
return -1
|
||||
}
|
||||
if len(buf) < 4 {
|
||||
break
|
||||
}
|
||||
buf = buf[4:]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue