Work on loading images

This commit is contained in:
Kovid Goyal
2017-09-27 09:10:56 +05:30
parent 8418cc04c1
commit c567acb4e5
4 changed files with 47 additions and 3 deletions

View File

@@ -664,6 +664,10 @@ 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)