aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorPaul Eggert2019-06-06 08:09:58 -0700
committerPaul Eggert2019-06-06 08:10:31 -0700
commit7c26e0b18d0cdf656778d6dd332972b538491d95 (patch)
tree48674c6c1658fb5e45d69ca99285480b8655fe82 /src/buffer.h
parente29fb7dfba96e63cb7ba2d2a68f91f8dec336100 (diff)
downloademacs-7c26e0b18d0cdf656778d6dd332972b538491d95.tar.gz
emacs-7c26e0b18d0cdf656778d6dd332972b538491d95.zip
Fix overflow issues in image rotation
Also, do some refactoring to simplify code. * src/dispextern.h (INIT_MATRIX, COPY_MATRIX, MULT_MATRICES): Remove. * src/image.c (matrix3x3): New type, replacing all uses of 3x3 double. (matrix3x3_copy, matrix3x3_mult): New functions, replacing COPY_MATRIX, MULT_MATRICES. Replace INIT_MATRIX by C initializers. (image_set_rotation): Use Fmod to avoid undefined behavior on double-to-int conversion and to reduce bignum rotations correctly. (image_set_crop): Finish up previous correction, by not re-setting width and height if compute_image_size has set them. Prefer shifting right by 1 to dividing by 2 if either will do.
Diffstat (limited to 'src/buffer.h')
0 files changed, 0 insertions, 0 deletions