Fix a possible NULL-pointer deference following a malloc failure.

Error discovered by Klocwork. (CVS 3327)

FossilOrigin-Name: 368bcf264456f5506260797497bc8d8dc4897e0f
This commit is contained in:
drh 2006-07-11 10:42:36 +00:00
parent ad6e1370b5
commit f64afeb53f
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Back\sout\sthe\schanges\sof\sticket\s#1687\ssince\sthey\sbroken\sthe\sActiveTcl\sbuild.\s(CVS\s3326)
D 2006-07-10T21:15:52
C Fix\sa\spossible\sNULL-pointer\sdeference\sfollowing\sa\smalloc\sfailure.\nError\sdiscovered\sby\sKlocwork.\s(CVS\s3327)
D 2006-07-11T10:42:36
F Makefile.in 9c2a76055c305868cc5f5b73e29a252ff3632c0a
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -64,7 +64,7 @@ F src/os_win.c c6976ae50b61fb5b7dce399e578aa1865f02b84f
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
F src/pager.c 2ae998a64f98bc2fa14893e08537365865a09519
F src/pager.h 43f32f3847421f7502cfbb66f4eb2302b8033818
F src/parse.y 438e0f9408427a3f1776cd6f55771f3d43ff29b4
F src/parse.y ecac666005bec0c813681a81de88d1de5d27577f
F src/pragma.c 27d5e395c5d950931c7ac4fe610e7c2993e2fa55
F src/prepare.c e477df44112e3ce167f048226432fca9d9cba6a0
F src/printf.c b179b6ed12f793e028dd169e2e2e2b2a37eedc63
@ -375,7 +375,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 30dfb9bf2131370fe57e000495f5c292d392a010
R ac4f8fe432dfc259763ae91b1cd16083
P b10d4220dc12728933eae1fcdcebd88a5f92e3a7
R 2487fc8a76f352045b0f691568aa792d
U drh
Z c8a3ef1571f936b0d43c784c52bf347b
Z 94d7b33c75f2bffcb7a8af85fe3a09da

View File

@ -1 +1 @@
b10d4220dc12728933eae1fcdcebd88a5f92e3a7
368bcf264456f5506260797497bc8d8dc4897e0f

View File

@ -14,7 +14,7 @@
** the parser. Lemon will also generate a header file containing
** numeric codes for all of the tokens.
**
** @(#) $Id: parse.y,v 1.205 2006/07/08 18:35:00 drh Exp $
** @(#) $Id: parse.y,v 1.206 2006/07/11 10:42:36 drh Exp $
*/
// All token codes are small integers with #defines that begin with "TK_"
@ -470,7 +470,7 @@ seltablist(A) ::= stl_prefix(X) nm(Y) dbnm(D) as(Z) on_opt(N) using_opt(U). {
seltablist(A) ::= stl_prefix(X) LP seltablist_paren(S) RP
as(Z) on_opt(N) using_opt(U). {
A = sqlite3SrcListAppend(X,0,0);
A->a[A->nSrc-1].pSelect = S;
if( A && A->nSrc>0 ) A->a[A->nSrc-1].pSelect = S;
if( Z.n ) sqlite3SrcListAddAlias(A,&Z);
if( N ){
if( A && A->nSrc>1 ){ A->a[A->nSrc-2].pOn = N; }