File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -895,8 +895,11 @@ RendererAgg::draw_image(const Py::Tuple& args) {
895895 thisx = i+x;
896896 thisy = isUpper ? oy+j : oy-j;
897897
898- if (thisx<0 || thisx>=width) continue ;
899- if (thisy<0 || thisy>=height) continue ;
898+ if (thisx<0 || thisx>=width || thisy<0 || thisy>=height) {
899+ ind += 4 ;
900+ continue ;
901+ }
902+
900903 pixfmt::color_type p;
901904 p.r = *(image->bufferOut +ind++);
902905 p.g = *(image->bufferOut +ind++);
Original file line number Diff line number Diff line change @@ -477,8 +477,10 @@ _image_module::from_images(const Py::Tuple& args) {
477477 for (size_t i=0 ; i<thisim->colsOut ; i++) {
478478 thisx = i+ox;
479479 thisy = j+oy;
480- if (thisx<0 || thisx>=numcols) continue ;
481- if (thisy<0 || thisy>=numrows) continue ;
480+ if (thisx<0 || thisx>=numcols || thisy<0 || thisy>=numrows) {
481+ ind +=4 ;
482+ continue ;
483+ }
482484
483485 pixfmt::color_type p;
484486 p.r = *(thisim->bufferOut +ind++);
You can’t perform that action at this time.
0 commit comments