瀏覽代碼

dither: fix integer multiplication overflow that caused crashes.

Fixes: #38 (CVE-2018-20546)
Fixes: #39 (CVE-2018-20547)
tags/v0.99.beta20
Sam Hocevar 6 年之前
父節點
當前提交
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;


Loading…
取消
儲存