diff options
author | Kristian Høgsberg <krh@redhat.com> | 2005-07-07 15:58:43 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2005-07-07 15:58:43 +0000 |
commit | 2eeab0b8afeb4897806df2de6e496889c25dda5e (patch) | |
tree | 7e5b12880535b36738bd4d0c453a280b7acb772f | |
parent | b1015f6bdbd93b2a2574a9f0e0e1cd7dbae9af78 (diff) |
2005-07-06 Kristian Høgsberg <krh@redhat.com>
* glib/poppler-page.cc (poppler_page_copy_to_pixbuf): Add out of
bounds checking (from Marco).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | glib/poppler-page.cc | 5 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2005-07-06 Kristian Høgsberg <krh@redhat.com> + + * glib/poppler-page.cc (poppler_page_copy_to_pixbuf): Add out of + bounds checking (from Marco). + 2005-07-07 Brad Hards <bradh@frogmouth.net> * glib/poppler-document.cc (convert_page_mode): Update to @@ -94,7 +99,6 @@ * qt4/tests/poppler-fonts.cpp (main): change order in test code to reflect actual testcase file - 2005-07-01 Kristian Høgsberg <krh@redhat.com> * poppler/TextOutputDev.cc: Make selection also work when dragging diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc index 148d3b5d..7e998e10 100644 --- a/glib/poppler-page.cc +++ b/glib/poppler-page.cc @@ -219,6 +219,11 @@ poppler_page_copy_to_pixbuf (PopplerPage *page, pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf); pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf); + if (cairo_width > gdk_pixbuf_get_width (pixbuf)) + cairo_width = gdk_pixbuf_get_width (pixbuf); + if (cairo_height > gdk_pixbuf_get_height (pixbuf)) + cairo_height = gdk_pixbuf_get_height (pixbuf); + for (y = 0; y < cairo_height; y++) { src = (unsigned int *) (cairo_data + y * cairo_rowstride); |