mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Fix seg fault when image dimensions don't match (bug#80518)
* src/image.c (four_corners_best): [USE_CAIRO] Reset the image dimensions to real values. (Fimage_transforms_p): Fix typo.
This commit is contained in:
parent
fedf45ca63
commit
d40e5050be
1 changed files with 9 additions and 1 deletions
10
src/image.c
10
src/image.c
|
|
@ -1937,6 +1937,14 @@ four_corners_best (Emacs_Pix_Context pimg, int *corners,
|
|||
RGB_PIXEL_COLOR best UNINIT;
|
||||
int i, best_count;
|
||||
|
||||
#ifdef USE_CAIRO
|
||||
/* Sometimes the Cairo codepath calls this function *after* the image
|
||||
sizes have been modified by native-transforms, so the pimg
|
||||
dimensions don't match WIDTH and HEIGHT. */
|
||||
width = pimg->width;
|
||||
height = pimg->height;
|
||||
#endif
|
||||
|
||||
if (corners && corners[BOT_CORNER] >= 0)
|
||||
{
|
||||
/* Get the colors at the corner_pixels of pimg. */
|
||||
|
|
@ -12848,7 +12856,7 @@ The list of capabilities can include one or more of the following:
|
|||
{
|
||||
#ifdef HAVE_NATIVE_TRANSFORMS
|
||||
# if defined HAVE_IMAGEMAGICK || defined (USE_CAIRO) || defined (HAVE_NS) \
|
||||
|| defined (HAVE_HAIKU) | defined HAVE_ANDROID
|
||||
|| defined (HAVE_HAIKU) || defined HAVE_ANDROID
|
||||
return list2 (Qscale, Qrotate90);
|
||||
# elif defined (HAVE_X_WINDOWS) && defined (HAVE_XRENDER)
|
||||
if (FRAME_DISPLAY_INFO (f)->xrender_supported_p)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue