1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-24 09:53:10 +03:00

Check-in (6230) introduced a bugs in SUBSTR() which was caught by the fuzz

tester.  Fixed by this check-in.  Related to ticket #3628. (CVS 6234)

FossilOrigin-Name: cd2e7f6c0fe4c0c648f8ca21388ab0769164f5ef
This commit is contained in:
drh
2009-02-03 13:10:54 +00:00
parent 07d3117aed
commit 478000cf5c
4 changed files with 15 additions and 10 deletions

View File

@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.218 2009/02/02 21:57:05 drh Exp $
** $Id: func.c,v 1.219 2009/02/03 13:10:54 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
@@ -224,6 +224,7 @@ static void substrFunc(
assert( p1>=0 && p2>=0 );
if( p1+p2>len ){
p2 = len-p1;
if( p2<0 ) p2 = 0;
}
if( p0type!=SQLITE_BLOB ){
while( *z && p1 ){