File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,9 @@ func (l *logger) SetMaxLevel(maxLevel int) {
140140
141141func newContext (prefix []interface {}, suffix []interface {}) []interface {} {
142142 normalizedSuffix := normalize (suffix )
143+ if len (normalizedSuffix ) > 1e8 {
144+ panic ("too many suffix" )
145+ }
143146 newCtx := make ([]interface {}, len (prefix )+ len (normalizedSuffix ))
144147 n := copy (newCtx , prefix )
145148 copy (newCtx [n :], normalizedSuffix )
@@ -217,8 +220,10 @@ type Lazy struct {
217220type Ctx map [string ]interface {}
218221
219222func (c Ctx ) toArray () []interface {} {
223+ if len (c ) > 1e8 {
224+ panic ("toArray too many arguments" )
225+ }
220226 arr := make ([]interface {}, len (c )* 2 )
221-
222227 i := 0
223228 for k , v := range c {
224229 arr [i ] = k
You can’t perform that action at this time.
0 commit comments