Another bounds check
This commit is contained in:
parent
98b6afccde
commit
b380917400
|
@ -77,6 +77,11 @@ func handleUpload(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if img.Bounds().Max.X != 8 || img.Bounds().Max.Y != 8 {
|
||||||
|
http.Error(w, "Invalid frame size", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Dump it to the raw file
|
// Dump it to the raw file
|
||||||
for y := 0; y < 8; y++ {
|
for y := 0; y < 8; y++ {
|
||||||
for x := 0; x < 8; x++ {
|
for x := 0; x < 8; x++ {
|
||||||
|
|
Loading…
Reference in New Issue