[REGDUMP]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 12 Oct 2016 12:41:31 +0000 (12:41 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 12 Oct 2016 12:41:31 +0000 (12:41 +0000)
- Fix a buffer overflow. Patch by Víctor Martínez Calvo.
ROSTESTS-203 #resolve

svn path=/trunk/; revision=72960

rostests/tests/regdump/regproc.c

index 56832b9..8aa8406 100644 (file)
@@ -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;