W3C Amaya ParseCharsetAndContentType()函数栈溢出漏洞

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

BUGTRAQ ID: 34389 Amaya是W3C出品的所见即所得的网页编辑/浏览器。 Amaya的XHTML解析器函数ParseCharsetAndContentType()在处理特制HTML页面的charset类型时存在栈溢出漏洞。以下是/amaya/XHTMLbuilder.c中有漏洞的代码段: 68 void ParseCharsetAndContentType (Element el, Document doc) 69 70 { 71 AttributeType attrType; 72 Attribute attr; 73 ElementType elType; 74 CHARSET charset; 75 char *text, *text2, *ptrText, *str; XXX 76 char charsetname[MAX_LENGTH]; 77 int length; 78 int pos, index = 0; 79 ... 125 126 if (charset == UNDEFINED_CHARSET) 127 { 128 /* the charset is not already defined by the http header */ 129 str = strstr (text2, \"charset=\"); 130 if (str) 131 { 132 pos = str - text2 + 8; 133 while (text2[pos] != SPACE && 134 text2[pos] != TAB && text2[pos] != EOS) 135 charsetname[index++] = text2[pos++]; XXX 136 charsetname[index] = EOS; 137 charset = TtaGetCharset (charsetname); 138 if (charset != UNDEFINED_CHARSET) 139 TtaSetDocumentCharset (doc, charset, FALSE); 140 } 141 } 142 TtaFreeMemory (text2); 143 } 144 } 145...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息