From 10fb11da9ed258810ee10127e387cc8b7b2f67e9 Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 9 Dec 2004 18:29:13 +0000 Subject: [PATCH] Enhance sqlite3_bind_parameter_index so that is does not segfault if you call it incorrectly by passing NULL in place of the parameter name. Ticket #1032. (CVS 2159) FossilOrigin-Name: bf81aabff1303b66f12d28b730d19b7cbdb2de6a --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/vdbeapi.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 82f4e914aa..edfc81a384 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Only\sevaluate\sexpressions\sonce\sfor\sUPDATE\sand\sINSERT\sstatements\sthat\nhave\sBEFORE\striggers.\s\sFix\sfor\sticket\s#980.\s(CVS\s2158) -D 2004-12-07T15:41:49 +C Enhance\ssqlite3_bind_parameter_index\sso\sthat\sis\sdoes\snot\ssegfault\sif\nyou\scall\sit\sincorrectly\sby\spassing\sNULL\sin\splace\sof\sthe\sparameter\sname.\nTicket\s#1032.\s(CVS\s2159) +D 2004-12-09T18:29:14 F Makefile.in da09f379b80c8cd78d78abaa0f32ca90a124e884 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1 @@ -79,7 +79,7 @@ F src/vacuum.c 705256e1111521fa04f0029de7f1667bc131d015 F src/vdbe.c aaec606fb513102314ca351006cea6656791bdcf F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181 F src/vdbeInt.h 0f74561e629af86172de7cdf0ecaea014c51696c -F src/vdbeapi.c 74be7f96c0a1ac275661f8b32276ac521d9ce37c +F src/vdbeapi.c 12ba371446b7ae0fe1f827d8df5ea399dfe52444 F src/vdbeaux.c a7c4c90786e2633b38f2d89f3dc49aed747454e4 F src/vdbemem.c 5876c8abf4374fef671f4fd8dc333ef3fc95a2f0 F src/where.c f9d3b6f2243a0eb9065fa4c465fe0831a64b7db7 @@ -263,7 +263,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25 F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c -P 8e164ab27771aced9a592ea4b7c27e9f184181a5 -R a25e54595d969baf18fc12c2ed784b4c +P 4852186aca3be6ea40069b6831079197e5fa757a +R 5fd97097019f1cf381f7aeb138d90537 U drh -Z c29cc9b7f0c7e31234ed5d8c1f56e385 +Z 833ca72c036e88e0bff95a97e8783ab0 diff --git a/manifest.uuid b/manifest.uuid index 7ff1e5a582..a0739aa5c7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4852186aca3be6ea40069b6831079197e5fa757a \ No newline at end of file +bf81aabff1303b66f12d28b730d19b7cbdb2de6a \ No newline at end of file diff --git a/src/vdbeapi.c b/src/vdbeapi.c index bc6a322d59..889131bb4b 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -593,7 +593,7 @@ int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){ createVarMap(p); for(i=0; inVar; i++){ const char *z = p->azVar[i]; - if( z && strcmp(z,zName)==0 ){ + if( z && zName && strcmp(z,zName)==0 ){ return i+1; } }