You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
br: ParseFrom func may overflow due to byte length overflow #63663
forlen(data) >0 {
switchdata[0] {
caseflagShortValuePrefix:
vlen:=data[1]
iflen(data[2:]) <int(vlen) {
returnerrors.Annotatef(berrors.ErrInvalidArgument,
"the length of short value is invalid, vlen: %v", int(vlen))
}
v.shortValue=data[2 : vlen+2]
data=data[vlen+2:]
vlen is a length flag, which only support 0-255. If vlen itself is 255, then vlen+2 would overflow.
We should transform it to a larger form to prevent the risk.
Activity
br: Use int for vlen to prevent overflow (#63662)
br: Use int for vlen to prevent overflow (#63662) (#63676)
br: cp overflow fix (#63717)