Commit Graph

4 Commits (master)

Author SHA1 Message Date
wilson chen 2e886046f8
Fix #497: gdImageColorMatch Out Of Bounds Write on Heap (CVE-2019-6977)
Fixed CVE-2019-6977 and add corresponding testcase.

Original patch by Christoph M. Bechker <cmbecker69@gmx.de>
https://gist.github.com/cmb69/1f36d285eb297ed326f5c821d7aafced
2019-12-20 10:12:04 +08:00
Christoph M. Becker b0333689ef Document all BGD_DECLARE'd functions
We add only minimal documentation comments for now, but at least that lets
Natural Docs add the function prototypes to the documentation.
2016-07-20 21:24:48 +02:00
Mike Frysinger ac33a3a6f1 fix implicit memset decl
Need to include string.h to get the memset prototype:

gd_color_match.c: In function 'gdImageColorMatch':
gd_color_match.c:32:2: warning: incompatible implicit declaration of built-in function 'memset' [enabled by default]
  memset (buf, 0, sizeof(unsigned long) * 5 * im2->colorsTotal );
  ^
2013-04-22 15:33:57 -04:00
Ondřej Surý 948a154266 Merge gdImageColorMatch from php-libgd 2013-04-22 08:44:21 +02:00