/ Check-in [59194311]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix an out-of-bounds read in the demonstration code in test_spellfix.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:59194311543b95c2aeebe2aba83da3c29b7c6460
User & Date: dan 2012-08-30 11:22:16
Context
2012-08-30
20:24
Exclude the atof1.test test script from the valgrind permutations test since valgrind sets up the floating point hardware in an unusual way that makes atof1 fail. check-in: d3cf6832 user: drh tags: trunk
11:22
Fix an out-of-bounds read in the demonstration code in test_spellfix.c. check-in: 59194311 user: dan tags: trunk
2012-08-29
10:28
Fix a typo in a comment in vdbe.c. No changes to code. check-in: 9fbe858b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_spellfix.c.

218
219
220
221
222
223
224

225
226
227
228
229
230
231
232
    if( (c==CCLASS_R || c==CCLASS_L) && cPrevX==CCLASS_VOWEL ){
       nOut--;   /* No vowels beside L or R */
    }
    cPrev = c;
    if( c==CCLASS_SILENT ) continue;
    cPrevX = c;
    c = className[c];

    if( c!=zOut[nOut-1] ) zOut[nOut++] = c;
  }
  zOut[nOut] = 0;
  return zOut;
}

/*
** This is an SQL function wrapper around phoneticHash().  See







>
|







218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
    if( (c==CCLASS_R || c==CCLASS_L) && cPrevX==CCLASS_VOWEL ){
       nOut--;   /* No vowels beside L or R */
    }
    cPrev = c;
    if( c==CCLASS_SILENT ) continue;
    cPrevX = c;
    c = className[c];
    assert( nOut>=0 );
    if( nOut==0 || c!=zOut[nOut-1] ) zOut[nOut++] = c;
  }
  zOut[nOut] = 0;
  return zOut;
}

/*
** This is an SQL function wrapper around phoneticHash().  See