mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
check: bounds-check roslice peeks, not just slice
This commit is contained in:
1 parent
92ff96359a
commit
bf3afab25a
1 file changed
+1
-1
@@ -1259,7 +1259,7 @@ func (q *checker) bcheckExprCallSpecialCases(n *a.Expr, depth uint32) (bounds, e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if recvTyp.Eq(typeExprSliceU8) {
|
} else if recvTyp.Eq(typeExprSliceU8) || recvTyp.Eq(typeExprRosliceU8) {
|
||||||
if method >= t.IDPeekU8 {
|
if method >= t.IDPeekU8 {
|
||||||
if m := method - t.IDPeekU8; m < t.ID(len(ioMethodAdvances)) {
|
if m := method - t.IDPeekU8; m < t.ID(len(ioMethodAdvances)) {
|
||||||
au := ioMethodAdvances[m]
|
au := ioMethodAdvances[m]
|
||||||
|
|||||||
Reference in new issue
Block a user