Fix stack buffer overrun problem in the test harness. (CVS 3832)

FossilOrigin-Name: cad9faf3ad99b68be4618dff4b3497b15b9e6d9d
This commit is contained in:
drh 2007-04-09 20:30:11 +00:00
parent a7e9c97a5a
commit 431e853715
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Version\s3.3.15\s(CVS\s3831)
D 2007-04-09T13:49:34
C Fix\sstack\sbuffer\soverrun\sproblem\sin\sthe\stest\sharness.\s(CVS\s3832)
D 2007-04-09T20:30:11
F Makefile.in 8cab54f7c9f5af8f22fd97ddf1ecfd1e1860de62
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -112,7 +112,7 @@ F src/test8.c 2af036d73b5ebf1b74d19f36b1b1ab22e1d99df1
F src/test9.c cb1a7b5a4a918bb0552fd0101fd3f88d85904cd2
F src/test_async.c 9d326ceda4306bcab252b8f7e8e480ed45d7ccb6
F src/test_autoext.c 855157d97aa28cf84233847548bfacda21807436
F src/test_hexio.c 9644c0360c3e1090f4a5765b9eb0492bb273bbb5
F src/test_hexio.c 32204b5ce281ebc85f789c69c4ec725129e7e7f5
F src/test_loadext.c 22065d601a18878e5542191001f0eaa5d77c0ed8
F src/test_md5.c 6c42bc0a3c0b54be34623ff77a0eec32b2fa96e3
F src/test_schema.c ced72140a3a25c148975428e170ec1850d3c3a7d
@ -455,7 +455,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 8d0dea873d00404ad252d056422da2630f5e525f
R ebeca99d359cd7d447985d5d230701cd
P ba5f4a55fad183a1698555b256f43f63451f5fc6
R 5ef4b02d2117db2ca987c4c827be07e2
U drh
Z 5f6c785fa4aa32ce5e91b17ceb47ce15
Z aefa6d34865394c1dd78203eae52ac99

View File

@ -1 +1 @@
ba5f4a55fad183a1698555b256f43f63451f5fc6
cad9faf3ad99b68be4618dff4b3497b15b9e6d9d

View File

@ -17,7 +17,7 @@
** with historical versions of the "binary" command. So it seems
** easier and safer to build our own mechanism.
**
** $Id: test_hexio.c,v 1.1 2007/04/06 15:02:14 drh Exp $
** $Id: test_hexio.c,v 1.2 2007/04/09 20:30:11 drh Exp $
*/
#include "tcl.h"
#include <stdlib.h>
@ -223,7 +223,7 @@ static int hexio_get_int(
memcpy(aNum, aOut, 4);
}else{
memset(aNum, 0, sizeof(aNum));
memcpy(&aNum[4-nOut], aOut, 4-nOut);
memcpy(&aNum[4-nOut], aOut, nOut);
}
free(aOut);
val = (aNum[0]<<24) | (aNum[1]<<16) | (aNum[2]<<8) | aNum[3];