From 7f94fb8b3df2582638faaa1d4193a7f7ce78c9a9 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Wed, 12 Oct 2016 12:41:31 +0000 Subject: [PATCH] =?utf8?q?[REGDUMP]=20-=20Fix=20a=20buffer=20overflow.=20P?= =?utf8?q?atch=20by=20V=C3=ADctor=20Mart=C3=ADnez=20Calvo.=20ROSTESTS-203?= =?utf8?q?=20#resolve?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=72960 --- rostests/tests/regdump/regproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rostests/tests/regdump/regproc.c b/rostests/tests/regdump/regproc.c index 56832b90031..8aa84060b97 100644 --- a/rostests/tests/regdump/regproc.c +++ b/rostests/tests/regdump/regproc.c @@ -310,7 +310,7 @@ DWORD convertHexCSVToHex(TCHAR* str, BYTE* buf, ULONG bufLen) TCHAR xbuf[3]; TCHAR wc; memcpy(xbuf, s, 2); - xbuf[3] = _T('\0'); + xbuf[2] = _T('\0'); _stscanf(xbuf, _T("%02x"), (UINT*)&wc); if (byteCount < bufLen) *b++ = (unsigned char)wc; -- 2.17.1