Fossil

Check-in [85fc2e0a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Check the return code form blob_delta_apply() to make sure there are no errors prior to using the result.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:85fc2e0a4801349657df46b4e75a343b8cc98c27
User & Date: drh 2016-04-19 03:16:00
Context
2016-04-19
17:44
Use retry logic for SSL read/write as described in the OpenSSL docs. check-in: 4abf6079 user: mistachkin tags: trunk
03:16
Check the return code form blob_delta_apply() to make sure there are no errors prior to using the result. check-in: 85fc2e0a user: drh tags: trunk
2016-04-18
21:57
Minor edits to unify merge command warning messages, plus tests. check-in: 451f04f6 user: joel tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/content.c.

280
281
282
283
284
285
286
287


288
289
290
291
292
293
294

295
296
297
298
299
300
301
    }
    mx = n;
    rc = content_get(a[n], pBlob);
    n--;
    while( rc && n>=0 ){
      rc = content_of_blob(a[n], &delta);
      if( rc ){
        blob_delta_apply(pBlob, &delta, &next);


        blob_reset(&delta);
        if( (mx-n)%8==0 ){
          content_cache_insert(a[n+1], pBlob);
        }else{
          blob_reset(pBlob);
        }
        *pBlob = next;

      }
      n--;
    }
    free(a);
    if( !rc ) blob_reset(pBlob);
  }
  if( rc==0 ){







|
>
>
|
|
|
|
|
|
|
>







280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
    }
    mx = n;
    rc = content_get(a[n], pBlob);
    n--;
    while( rc && n>=0 ){
      rc = content_of_blob(a[n], &delta);
      if( rc ){
        if( blob_delta_apply(pBlob, &delta, &next)<0 ){
          rc = 1;
        }else{
          blob_reset(&delta);
          if( (mx-n)%8==0 ){
            content_cache_insert(a[n+1], pBlob);
          }else{
            blob_reset(pBlob);
          }
          *pBlob = next;
        }
      }
      n--;
    }
    free(a);
    if( !rc ) blob_reset(pBlob);
  }
  if( rc==0 ){