mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Honor MaxImplements
This commit is contained in:
1 parent
d307fe3a42
commit
e9897f6efb
1 file changed
+3
@@ -263,6 +263,9 @@ func (p *parser) parseTopLevelDecl() (*a.Node, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(implements) > a.MaxImplements {
|
||||
return nil, fmt.Errorf(`parse: too many implements listed at %s:%d`, p.filename, p.line())
|
||||
}
|
||||
}
|
||||
|
||||
fields, err := p.parseList(t.IDCloseParen, (*parser).parseFieldNode)
|
||||
|
||||
Reference in new issue
Block a user