Sfoglia il codice sorgente

dither: fix integer multiplication overflow that caused crashes.

Fixes: #38 (CVE-2018-20546)
Fixes: #39 (CVE-2018-20547)
tags/v0.99.beta20
Sam Hocevar 5 anni fa
parent
commit
1022d97496
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +3
    -3
      caca/dither.c

+ 3
- 3
caca/dither.c Vedi File

@@ -6,8 +6,8 @@
* This library is free software. It comes without any warranty, to * This library is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it * 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 * 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 struct caca_dither
{ {
int bpp, has_palette, has_alpha; int bpp, has_palette, has_alpha;
int w, h, pitch;
size_t w, h, pitch;
int rmask, gmask, bmask, amask; int rmask, gmask, bmask, amask;
int rright, gright, bright, aright; int rright, gright, bright, aright;
int rleft, gleft, bleft, aleft; int rleft, gleft, bleft, aleft;


Caricamento…
Annulla
Salva