@@ -251,7 +251,7 @@ func NewModule(ctx context.Context, modCfg *ModuleConfig, binary []byte, opts ..
251251 // this is to prevent decompression bombs
252252 if err := modCfg .MaxCompressedBinaryLimiter .Check (ctx , config .SizeOf (binary )); err != nil {
253253 if errors .Is (err , limits.ErrorBoundLimited [config.Size ]{}) {
254- return nil , fmt .Errorf ("compressed binary size exceeds the maximum allowed size of %d bytes : %w" , modCfg . MaxCompressedBinarySize , err )
254+ return nil , fmt .Errorf ("compressed binary size exceeds the maximum allowed size: %w" , err )
255255 }
256256 return nil , fmt .Errorf ("failed to check compressed binary size limit: %w" , err )
257257 }
@@ -273,7 +273,7 @@ func NewModule(ctx context.Context, modCfg *ModuleConfig, binary []byte, opts ..
273273 // The Read() method will return io.EOF, and ReadAll will gracefully handle it and return nil.
274274 if err := modCfg .MaxDecompressedBinaryLimiter .Check (ctx , config .SizeOf (binary )); err != nil {
275275 if errors .Is (err , limits.ErrorBoundLimited [config.Size ]{}) {
276- return nil , fmt .Errorf ("decompressed binary size reached the maximum allowed size of %d bytes : %w" , modCfg . MaxDecompressedBinarySize , err )
276+ return nil , fmt .Errorf ("decompressed binary size reached the maximum allowed size: %w" , err )
277277 }
278278 return nil , fmt .Errorf ("failed to check decompressed binary size limit: %w" , err )
279279 }
0 commit comments