Revision: 8040 https://osdn.net/projects/ttssh2/scm/svn/commits/8040 Author: yutakapon Date: 2019-08-30 23:04:23 +0900 (Fri, 30 Aug 2019) Log Message: ----------- HTTPプロキシ接続がエラーとなり、ステータスコードが401,407,400,405,406,403以外だった場合、 メッセージボックスにゴミが表示される問題を修正した。 Modified Paths: -------------- branches/ttssh_improved/TTProxy/ProxyWSockHook.h -------------- next part -------------- Modified: branches/ttssh_improved/TTProxy/ProxyWSockHook.h =================================================================== --- branches/ttssh_improved/TTProxy/ProxyWSockHook.h 2019-08-30 13:50:17 UTC (rev 8039) +++ branches/ttssh_improved/TTProxy/ProxyWSockHook.h 2019-08-30 14:04:23 UTC (rev 8040) @@ -1363,7 +1363,9 @@ } } while (strcmp(buf,"\r\n") != 0); if (status_code != 200) { - char uimsg[MAX_UIMSG]; + char uimsg[MAX_UIMSG] = {0}; + char tmp[MAX_UIMSG + 32]; + switch (status_code) { case 401: case 407: @@ -1374,8 +1376,13 @@ case 405: case 406: case 403: - UTIL_get_lang_msg("MSG_PROXY_BAD_REQUEST", uimsg, sizeof(uimsg), + // \x8AY\x93\x96\x82\xB5\x82Ȃ\xA2\x83X\x83e\x81[\x83^\x83X\x83R\x81[\x83h\x82\xBE\x82\xC1\x82\xBD\x8Fꍇ\x81A\x95s\x92\xE8\x82ȓ\xE0\x97e\x82\xCCuimsg[]\x82\xAA + // MessageBox\x82ɕ\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B + default: + UTIL_get_lang_msg("MSG_PROXY_BAD_REQUEST", tmp, sizeof(tmp), "Proxy prevent this connection!"); + _snprintf_s(uimsg, sizeof(uimsg), _TRUNCATE, "%s(HTTP: status code %d)", + tmp, status_code); break; } return setError(s, uimsg);