FS-8905 #resolve [Heap overflow in img patch]

This commit is contained in:
Anthony Minessale committed 2016-03-05 14:41:38 -06:00
1 parent 931e8b6633
commit e0b303e2cb
3 files changed
+16 -12

No files matched your search

+3 -1
View File
@@ -580,11 +580,13 @@ static inline void switch_img_get_rgb_pixel(switch_image_t *img, switch_rgb_colo
#endif
}
SWITCH_DECLARE(void) switch_img_overlay(switch_image_t *IMG, switch_image_t *img, int x, int y, uint8_t alpha)
SWITCH_DECLARE(void) switch_img_overlay(switch_image_t *IMG, switch_image_t *img, int x, int y, uint8_t percent)
{
int i, j, len, max_h;
switch_rgb_color_t RGB = {0}, rgb = {0}, c = {0};
int xoff = 0, yoff = 0;
uint8_t alpha = (int8_t)((255 * percent) / 100);
switch_assert(IMG->fmt == SWITCH_IMG_FMT_I420);