[PHP-dev 243] Patch for php-3.0.18-i18n-ja-2 (About CERT CA-2002-05)
Hiroyuki Une
php-dev@php.gr.jp
Thu, 28 Feb 2002 18:17:48 +0900
----Next_Part(Thu_Feb_28_18:17:44_2002_809)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
鵜根@広島国際学院大学です。はじめてお目にかかります。
2/27に発行された CERT Advisory CA-2002-05 に
PHP に関する vulnerability が報告されております。
一応パッチも公開されているのですが、
i18n 版の php-3.0.18にはパッチがそのままあたらない様ですので、
こちらでパッチを作ってみました。
それと質問なのですが、php3 系列の開発は終了したとのことですが、
今回のようなセキュリティに関する対応はどの様になっているのでしょうか。
よろしくお願いします。
---
鵜根弘行: 広島国際学院大学 工学部 電子工学科 (旧称 広島電機大学)
une@seiryu.es.hkg.ac.jp or harrier@seiryu.es.hkg.ac.jp
----Next_Part(Thu_Feb_28_18:17:44_2002_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=mime.c.diff-3.0-i18n
--- mime.c.1.64 Thu Feb 28 12:59:05 2002
+++ mime.c Thu Feb 28 13:02:46 2002
@@ -113,7 +113,9 @@
SAFE_RETURN;
}
loc = memchr(ptr, '\n', rem);
+ rem -= loc - ptr;
name = strstr(ptr, " name=");
+ ptr = loc;
if (name && name < loc) {
name += 6;
s = memchr(name, '\"', loc - name);
@@ -172,6 +174,10 @@
sbuf=estrdup(abuf);
#endif /* PHP3_I18N */
} else {
+ if (abuf) {
+ efree(abuf);
+ abuf = NULL;
+ }
#ifdef PHP3_I18N
i18n_http_post_puts(namebuf);
i18n_http_post_puts("_name");
----Next_Part(Thu_Feb_28_18:17:44_2002_809)----