diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2009-06-19 13:11:36 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2009-06-19 13:11:36 -0400 |
commit | c1ff2a39f4abae6cf587df14a9754b98c1ccc0e3 (patch) | |
tree | 7e2b1f7698a756d0531ebc40711948a83b471ad7 /src/html.cc | |
parent | f04e6473ce9df77056e7b188b17a5e3e0015c297 (diff) |
Added a limit for PNG image size
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/html.cc b/src/html.cc index 18bb34a9..86e5fe97 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1953,8 +1953,6 @@ static void Html_tag_open_address(DilloHtml *html, DilloImage *a_Html_image_new(DilloHtml *html, const char *tag, int tagsize, DilloUrl *url) { - const int MAX_W = 6000, MAX_H = 6000; - DilloImage *Image; char *width_ptr, *height_ptr, *alt_ptr; const char *attrbuf; @@ -1987,7 +1985,7 @@ DilloImage *a_Html_image_new(DilloHtml *html, const char *tag, h = (int) (CSS_LENGTH_TYPE(l_h) == CSS_LENGTH_TYPE_PX ? CSS_LENGTH_VALUE(l_h) : 0); } - if (w < 0 || h < 0 || abs(w*h) > MAX_W * MAX_H) { + if (w < 0 || h < 0 || abs(w*h) > IMAGE_MAX_W * IMAGE_MAX_H) { dFree(width_ptr); dFree(height_ptr); width_ptr = height_ptr = NULL; |