提交 79b2d64a 编写于 作者: G Glenn Randers-Pehrson

[devel] also check for negative out-of-range text compression mode

上级 e34f80e5
......@@ -677,14 +677,15 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr,
if (text_ptr[i].key == NULL)
continue;
key_len = png_strlen(text_ptr[i].key);
if (text_ptr[i].compression >= PNG_TEXT_COMPRESSION_LAST)
if (text_ptr[i].compression < PNG_TEXT_COMPRESSION_NONE ||
text_ptr[i].compression >= PNG_TEXT_COMPRESSION_LAST)
{
png_warning(png_ptr, "text compression mode is out of range");
continue;
}
key_len = png_strlen(text_ptr[i].key);
if (text_ptr[i].compression <= 0)
{
lang_len = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册