Roll back [84e38341aeab] because a direct pointer comparison is ill-advised when the client-data string is dynamically allocated.
FossilOrigin-Name: 7b884832b71c23e62ba3c0d53f7c89199734c351f909d84ac19ac18c7ddccbd8
This commit is contained in:
parent
93b461ff00
commit
7fa8d65539
15
manifest
15
manifest
@ -1,5 +1,5 @@
|
||||
C Add\sdocumentation\sto\ssqlite3_get/set_clientdata()\sto\smake\sit\sclear\sthat\sthese\nare\ssecurity-sensitive\sinterfaces\sthat\sshould\snot\sbe\sexposed\sto\spotential\nattackers.
|
||||
D 2023-09-06T17:07:53.343
|
||||
C Roll\sback\s[84e38341aeab]\sbecause\sa\sdirect\spointer\scomparison\sis\sill-advised\swhen\sthe\sclient-data\sstring\sis\sdynamically\sallocated.
|
||||
D 2023-09-10T10:56:28.783
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -668,7 +668,7 @@ F src/insert.c 3f0a94082d978bbdd33c38fefea15346c6c6bffb70bc645a71dc0f1f87dd3276
|
||||
F src/json.c ae840f87b418f039f5d336b488933d09396bd31e6b31e855b93055ccaee4e255
|
||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||
F src/loadext.c 98cfba10989b3da6f1807ad42444017742db7f100a54f1032af7a8b1295912c0
|
||||
F src/main.c 42a55d977879a6968d4b1609424b318f991bd0375e48ac42d8f742f41e243468
|
||||
F src/main.c 2adfb1973ee495977f8c75d6590aae9882161d5f8749b46621299656a2df0cc6
|
||||
F src/malloc.c 47b82c5daad557d9b963e3873e99c22570fb470719082c6658bf64e3012f7d23
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c 3bb59158c38e05f6270e761a9f435bf19827a264c13d1631c58b84bdc96d73b2
|
||||
@ -2115,8 +2115,9 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 84e38341aeab4fd51690e8536d0101d00e3fb11cc50ebcff05ed219c98328872
|
||||
R ba107aa1186f8a45aa47c9a536cfe51b
|
||||
U drh
|
||||
Z 0b41bcf28b9ce0b44f7baeffddd8bf46
|
||||
P 2837061d66672a0a73c3fd2ff35ce0e1a66ee6d5365be25d4cc0ccba170c3665
|
||||
Q -84e38341aeab4fd51690e8536d0101d00e3fb11cc50ebcff05ed219c98328872
|
||||
R 02e3e46c1cccd00057fe7df753345750
|
||||
U stephan
|
||||
Z 61ef124a3f5005010110573ed4089eb8
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
2837061d66672a0a73c3fd2ff35ce0e1a66ee6d5365be25d4cc0ccba170c3665
|
||||
7b884832b71c23e62ba3c0d53f7c89199734c351f909d84ac19ac18c7ddccbd8
|
@ -3725,7 +3725,7 @@ void *sqlite3_get_clientdata(sqlite3 *db, const char *zName){
|
||||
DbClientData *p;
|
||||
sqlite3_mutex_enter(db->mutex);
|
||||
for(p=db->pDbData; p; p=p->pNext){
|
||||
if( zName==p->zName || strcmp(p->zName, zName)==0 ){
|
||||
if( strcmp(p->zName, zName)==0 ){
|
||||
void *pResult = p->pData;
|
||||
sqlite3_mutex_leave(db->mutex);
|
||||
return pResult;
|
||||
@ -3747,9 +3747,7 @@ int sqlite3_set_clientdata(
|
||||
DbClientData *p, **pp;
|
||||
sqlite3_mutex_enter(db->mutex);
|
||||
pp = &db->pDbData;
|
||||
for(p=db->pDbData;
|
||||
p && (zName!=p->zName && strcmp(p->zName,zName));
|
||||
p=p->pNext){
|
||||
for(p=db->pDbData; p && strcmp(p->zName,zName); p=p->pNext){
|
||||
pp = &p->pNext;
|
||||
}
|
||||
if( p ){
|
||||
|
Loading…
Reference in New Issue
Block a user