1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00

MaxUint32-sized array is too much for 32bit

This commit is contained in:
DarthSim 2019-08-13 21:29:04 +06:00
parent f49fe01e00
commit 7f95569dcf

View File

@ -292,7 +292,7 @@ func (img *vipsImage) Save(imgtype imageType, quality int) ([]byte, context.Canc
return nil, cancel, vipsError()
}
b := (*[math.MaxUint32]byte)(ptr)[:int(imgsize):int(imgsize)]
b := (*[math.MaxInt32]byte)(ptr)[:int(imgsize):int(imgsize)]
return b, cancel, nil
}