Fossil SCM
Make sure the content of a manifest has been materialized and is not a copy-or-write segment of another blob prior to parsing it. Ticket [9c3e2a224b6b0055]
Commit
05389804886bba19776938c5350e0043a1f97239
Parent
621be704940afee…
1 file changed
+1
-1
+1
-1
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -342,11 +342,11 @@ | ||
| 342 | 342 | int sz = 0; |
| 343 | 343 | |
| 344 | 344 | /* Every control artifact ends with a '\n' character. Exit early |
| 345 | 345 | ** if that is not the case for this artifact. |
| 346 | 346 | */ |
| 347 | - z = blob_buffer(pContent); | |
| 347 | + z = blob_materialize(pContent); | |
| 348 | 348 | n = blob_size(pContent); |
| 349 | 349 | if( n<=0 || z[n-1]!='\n' ){ |
| 350 | 350 | blob_reset(pContent); |
| 351 | 351 | return 0; |
| 352 | 352 | } |
| 353 | 353 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -342,11 +342,11 @@ | |
| 342 | int sz = 0; |
| 343 | |
| 344 | /* Every control artifact ends with a '\n' character. Exit early |
| 345 | ** if that is not the case for this artifact. |
| 346 | */ |
| 347 | z = blob_buffer(pContent); |
| 348 | n = blob_size(pContent); |
| 349 | if( n<=0 || z[n-1]!='\n' ){ |
| 350 | blob_reset(pContent); |
| 351 | return 0; |
| 352 | } |
| 353 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -342,11 +342,11 @@ | |
| 342 | int sz = 0; |
| 343 | |
| 344 | /* Every control artifact ends with a '\n' character. Exit early |
| 345 | ** if that is not the case for this artifact. |
| 346 | */ |
| 347 | z = blob_materialize(pContent); |
| 348 | n = blob_size(pContent); |
| 349 | if( n<=0 || z[n-1]!='\n' ){ |
| 350 | blob_reset(pContent); |
| 351 | return 0; |
| 352 | } |
| 353 |