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]

drh 2011-06-09 19:20 trunk
Commit 05389804886bba19776938c5350e0043a1f97239
1 file changed +1 -1
+1 -1
--- src/manifest.c
+++ src/manifest.c
@@ -342,11 +342,11 @@
342342
int sz = 0;
343343
344344
/* Every control artifact ends with a '\n' character. Exit early
345345
** if that is not the case for this artifact.
346346
*/
347
- z = blob_buffer(pContent);
347
+ z = blob_materialize(pContent);
348348
n = blob_size(pContent);
349349
if( n<=0 || z[n-1]!='\n' ){
350350
blob_reset(pContent);
351351
return 0;
352352
}
353353
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button