Fossil SCM
Remove a harmless comparison from the decompress() SQL function implementation.
Commit
87567ad869f0809f6beccc3f94c71a21f68bffd77ecdd203bb9217586ade6fd3
Parent
1fbd2e15907db6f…
1 file changed
-1
-1
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -119,11 +119,10 @@ | ||
| 119 | 119 | pIn = sqlite3_value_blob(argv[0]); |
| 120 | 120 | if( pIn==0 ) return; |
| 121 | 121 | nIn = sqlite3_value_bytes(argv[0]); |
| 122 | 122 | if( nIn<4 ) return; |
| 123 | 123 | nOut = (pIn[0]<<24) + (pIn[1]<<16) + (pIn[2]<<8) + pIn[3]; |
| 124 | - if( nOut<0 ) return; | |
| 125 | 124 | pOut = sqlite3_malloc( nOut+1 ); |
| 126 | 125 | rc = uncompress(pOut, &nOut, &pIn[4], nIn-4); |
| 127 | 126 | if( rc==Z_OK ){ |
| 128 | 127 | sqlite3_result_blob(context, pOut, nOut, sqlite3_free); |
| 129 | 128 | }else if( rc==Z_MEM_ERROR ){ |
| 130 | 129 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -119,11 +119,10 @@ | |
| 119 | pIn = sqlite3_value_blob(argv[0]); |
| 120 | if( pIn==0 ) return; |
| 121 | nIn = sqlite3_value_bytes(argv[0]); |
| 122 | if( nIn<4 ) return; |
| 123 | nOut = (pIn[0]<<24) + (pIn[1]<<16) + (pIn[2]<<8) + pIn[3]; |
| 124 | if( nOut<0 ) return; |
| 125 | pOut = sqlite3_malloc( nOut+1 ); |
| 126 | rc = uncompress(pOut, &nOut, &pIn[4], nIn-4); |
| 127 | if( rc==Z_OK ){ |
| 128 | sqlite3_result_blob(context, pOut, nOut, sqlite3_free); |
| 129 | }else if( rc==Z_MEM_ERROR ){ |
| 130 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -119,11 +119,10 @@ | |
| 119 | pIn = sqlite3_value_blob(argv[0]); |
| 120 | if( pIn==0 ) return; |
| 121 | nIn = sqlite3_value_bytes(argv[0]); |
| 122 | if( nIn<4 ) return; |
| 123 | nOut = (pIn[0]<<24) + (pIn[1]<<16) + (pIn[2]<<8) + pIn[3]; |
| 124 | pOut = sqlite3_malloc( nOut+1 ); |
| 125 | rc = uncompress(pOut, &nOut, &pIn[4], nIn-4); |
| 126 | if( rc==Z_OK ){ |
| 127 | sqlite3_result_blob(context, pOut, nOut, sqlite3_free); |
| 128 | }else if( rc==Z_MEM_ERROR ){ |
| 129 |