1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-23 11:14:48 +02:00

Use strings.Builder instead of bytes.Buffer in feDropShadow fix

This commit is contained in:
DarthSim 2022-10-17 12:14:03 +06:00
parent 4ab415fd9b
commit 296d2db8cf

View File

@ -81,11 +81,13 @@ func Satitize(data *imagedata.ImageData) (*imagedata.ImageData, error) {
} }
func replaceDropShadowNode(l *xml.Lexer, buf *bytes.Buffer) error { func replaceDropShadowNode(l *xml.Lexer, buf *bytes.Buffer) error {
inAttrs := new(bytes.Buffer) var (
blurAttrs := new(bytes.Buffer) inAttrs strings.Builder
offsetAttrs := new(bytes.Buffer) blurAttrs strings.Builder
floodAttrs := new(bytes.Buffer) offsetAttrs strings.Builder
finalAttrs := new(bytes.Buffer) floodAttrs strings.Builder
finalAttrs strings.Builder
)
inID, _ := nanoid.New(8) inID, _ := nanoid.New(8)
offsetID, _ := nanoid.New(8) offsetID, _ := nanoid.New(8)