Nicer error responses on bad graphics data

This commit is contained in:
Kovid Goyal
2017-09-28 08:08:06 +05:30
parent 2786976c63
commit 204bd97198
3 changed files with 32 additions and 28 deletions

View File

@@ -665,10 +665,6 @@ parse_graphics_code(Screen *screen, PyObject UNUSED *dump_callback) {
default:
break;
}
if (g.data_width > 10000 || g.data_height > 10000) {
REPORT_ERROR("Image too large");
return;
}
#define A(x) #x, g.x
#define U(x) #x, (unsigned int)(g.x)
#define I(x) #x, (int)(g.x)