提交 8554ee15 编写于 作者: J Junio C Hamano

Merge branch 'mk/mingw-winansi-ttyname-termination-fix' into maint

A potential but unlikely buffer overflow in Windows port has been
fixed.

* mk/mingw-winansi-ttyname-termination-fix:
  mingw: consider that UNICODE_STRING::Length counts bytes
...@@ -540,7 +540,7 @@ static void detect_msys_tty(int fd) ...@@ -540,7 +540,7 @@ static void detect_msys_tty(int fd)
buffer, sizeof(buffer) - 2, &result))) buffer, sizeof(buffer) - 2, &result)))
return; return;
name = nameinfo->Name.Buffer; name = nameinfo->Name.Buffer;
name[nameinfo->Name.Length] = 0; name[nameinfo->Name.Length / sizeof(*name)] = 0;
/* /*
* Check if this could be a MSYS2 pty pipe ('msys-XXXX-ptyN-XX') * Check if this could be a MSYS2 pty pipe ('msys-XXXX-ptyN-XX')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册