浏览代码

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 年前
父节点
当前提交
1022d97496
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      caca/dither.c

+ 3
- 3
caca/dither.c 查看文件

@@ -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;


正在加载...
取消
保存