SQLite

Check-in [5e1d247e5b]
Login

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

Overview
Comment:Change a memcpy() in sqlite3FileSuffix() to memmove() on the grounds that the source and destination may overlap.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5e1d247e5b3b5dcf6763f01002e996786db48152
User & Date: dan 2011-11-04 12:05:52.920
Context
2011-11-04
14:36
Update the xfer optimization code so that the xfer optimization can be used with INTEGER PRIMARY KEY ON CONFLICT ... as long as the destination table is initially empty. Improvements to the comments on the xfer optimization. New test cases added. (check-in: e3f368cd5e user: drh tags: trunk)
12:05
Change a memcpy() in sqlite3FileSuffix() to memmove() on the grounds that the source and destination may overlap. (check-in: 5e1d247e5b user: dan tags: trunk)
10:37
Add a missing va_end() macro to fts3.c. (check-in: e6f825748a user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/util.c.
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
  zOk = sqlite3_uri_parameter(zBaseFilename, "8_3_names");
  if( zOk && sqlite3GetBoolean(zOk) )
#endif
  {
    int i, sz;
    sz = sqlite3Strlen30(z);
    for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}
    if( z[i]=='.' && ALWAYS(sz>i+4) ) memcpy(&z[i+1], &z[sz-3], 4);
  }
}
#endif







|



1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
  zOk = sqlite3_uri_parameter(zBaseFilename, "8_3_names");
  if( zOk && sqlite3GetBoolean(zOk) )
#endif
  {
    int i, sz;
    sz = sqlite3Strlen30(z);
    for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}
    if( z[i]=='.' && ALWAYS(sz>i+4) ) memmove(&z[i+1], &z[sz-3], 4);
  }
}
#endif