Pārlūkot izejas kodu

dither: fix integer multiplication overflow that caused crashes.

Fixes: #38 (CVE-2018-20546)
Fixes: #39 (CVE-2018-20547)
tags/v0.99.beta20
Sam Hocevar pirms 6 gadiem
vecāks
revīzija
1022d97496
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. +3
    -3
      caca/dither.c

+ 3
- 3
caca/dither.c Parādīt failu

@@ -6,8 +6,8 @@
* This library is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What the Fuck You Want
* to Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details.
* to Public License, Version 2, as published by the WTFPL Task Force.
* See http://www.wtfpl.net/ for more details.
*/

/*
@@ -116,7 +116,7 @@ enum color_mode
struct caca_dither
{
int bpp, has_palette, has_alpha;
int w, h, pitch;
size_t w, h, pitch;
int rmask, gmask, bmask, amask;
int rright, gright, bright, aright;
int rleft, gleft, bleft, aleft;


Notiek ielāde…
Atcelt
Saglabāt