diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-03 09:47:22 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-03 10:25:09 -0800 |
commit | bcb4651c412dc8b37f1e9978681a958b7e919277 (patch) | |
tree | 535351f28517991db5198f72d7408f083f7067d7 /lisp/find-lisp.el | |
parent | 02386da9389104ca4d4dde875a3fdac36eb10555 (diff) | |
download | emacs-bcb4651c412dc8b37f1e9978681a958b7e919277.tar.gz emacs-bcb4651c412dc8b37f1e9978681a958b7e919277.tar.bz2 emacs-bcb4651c412dc8b37f1e9978681a958b7e919277.zip |
Improve overflow checking in svg_load_image
* src/image.c: Include math.h, for lrint.
(scale_image_size, compute_image_size): Use ‘double’, not ‘int’
for image size args, since librsvg uses ‘double’ for pixel counts.
(scale_image_size): Use ceil instead of rounding, to avoid
discarding fractional SVG pixels. Divisor and multiplier are now
double instead of int, for better portability to librsvg
functions with fractional pixel sizes.
(image_get_dimension, compute_image_size, svg_load_image):
Be more careful about ignoring, rejecting or clipping scale
factors or sizes that are out of integer range.
(compute_image_size): Don’t bother to calculate :max-width if
:width is specified, and likewise for :max-height and :height.
Diffstat (limited to 'lisp/find-lisp.el')
0 files changed, 0 insertions, 0 deletions