Fossil SCM
In send_unversioned_file(), finalize the statement before returning when a SHA3 hash cannot be sent to a client older than version 2.0. Leaving the statement, a local variable, on the list of open statements made the next finalize read and write a stack frame that had already returned.
Commit
34e92f7340e01b81dd698b627df65596ce7c65cc5ec0dec45257bc1795a4f156
Parent
acb3fd723e0c709…
1 file changed
+1
-1
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -749,11 +749,11 @@ | ||
| 749 | 749 | if( db_step(&q1)==SQLITE_ROW ){ |
| 750 | 750 | sqlite3_int64 mtime = db_column_int64(&q1, 0); |
| 751 | 751 | const char *zHash = db_column_text(&q1, 1); |
| 752 | 752 | if( pXfer->remoteVersion<20000 && db_column_bytes(&q1,1)>HNAME_LEN_SHA1 ){ |
| 753 | 753 | xfer_cannot_send_sha3_error(pXfer); |
| 754 | - db_reset(&q1); | |
| 754 | + db_finalize(&q1); | |
| 755 | 755 | return; |
| 756 | 756 | } |
| 757 | 757 | if( isFull ){ |
| 758 | 758 | /* If we have already reached the send size limit, send a (short) |
| 759 | 759 | ** uvigot card rather than a uvfile card. This only happens on the |
| 760 | 760 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -749,11 +749,11 @@ | |
| 749 | if( db_step(&q1)==SQLITE_ROW ){ |
| 750 | sqlite3_int64 mtime = db_column_int64(&q1, 0); |
| 751 | const char *zHash = db_column_text(&q1, 1); |
| 752 | if( pXfer->remoteVersion<20000 && db_column_bytes(&q1,1)>HNAME_LEN_SHA1 ){ |
| 753 | xfer_cannot_send_sha3_error(pXfer); |
| 754 | db_reset(&q1); |
| 755 | return; |
| 756 | } |
| 757 | if( isFull ){ |
| 758 | /* If we have already reached the send size limit, send a (short) |
| 759 | ** uvigot card rather than a uvfile card. This only happens on the |
| 760 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -749,11 +749,11 @@ | |
| 749 | if( db_step(&q1)==SQLITE_ROW ){ |
| 750 | sqlite3_int64 mtime = db_column_int64(&q1, 0); |
| 751 | const char *zHash = db_column_text(&q1, 1); |
| 752 | if( pXfer->remoteVersion<20000 && db_column_bytes(&q1,1)>HNAME_LEN_SHA1 ){ |
| 753 | xfer_cannot_send_sha3_error(pXfer); |
| 754 | db_finalize(&q1); |
| 755 | return; |
| 756 | } |
| 757 | if( isFull ){ |
| 758 | /* If we have already reached the send size limit, send a (short) |
| 759 | ** uvigot card rather than a uvfile card. This only happens on the |
| 760 |