Skip to content

Commit 1022d97

Browse files
committed
dither: fix integer multiplication overflow that caused crashes.
Fixes: #38 (CVE-2018-20546) Fixes: #39 (CVE-2018-20547)
1 parent 3e52dab commit 1022d97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: caca/dither.c

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

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

0 commit comments

Comments
 (0)