MM-20934: Fixing int overflow in 32 bits on MaxImageSize check (#14280)

* MM-20934: Fixing int overflow in 32 bits on MaxImageSize check

* Adding comments explaining the casting and the bug fixed there

* Apply suggestions from code review

Co-Authored-By: Juho Nurminen <juhonurm@gmail.com>

* Fixing store layers

Co-authored-by: Juho Nurminen <juhonurm@gmail.com>
Этот коммит содержится в:
Jesús Espino
2020-04-16 15:23:27 +02:00
коммит произвёл GitHub
родитель cd63c1153f
Коммит 7ea637be10
5 изменённых файлов: 23 добавлений и 7 удалений

Просмотреть файл

@@ -9,7 +9,7 @@ import (
)
const (
MaxImageSize = 6048 * 4032 // 24 megapixels, roughly 36MB as a raw image
MaxImageSize = int64(6048 * 4032) // 24 megapixels, roughly 36MB as a raw image
)
var (