Fossil

Check-in [ef68eb01]
Login

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

Overview
Comment:Fixed a crash case off-by-1 in th1 (ob get).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | th1-query-api
Files: files | file ages | folders
SHA1: ef68eb01069462e73cf214a1641adf582a7a6a63
User & Date: stephan 2012-07-14 18:55:12
Context
2012-07-14
19:19
Documented the "ob" API, added "ob level". check-in: 66104f8b user: stephan tags: th1-query-api
18:55
Fixed a crash case off-by-1 in th1 (ob get). check-in: ef68eb01 user: stephan tags: th1-query-api
18:44
i think i fixed the th.c-needs-blob.h build problem (again). Merged in 9f83e033a2304a9. check-in: 960576b9 user: stephan tags: th1-query-api
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/th.c.

2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
    return TH_ERROR;
  }else{
    int argPos = 2;
    char const * sub;
    int subL;
    int rc = TH_OK;
    Th_SetResult( interp, blob_str(b), b->nUsed );
    if(argc>=argPos){
      sub = argv[argPos];
      subL = argl[argPos];
      /* "ob get clean" */
      if(!rc && th_strlen(sub)==5 && 0==memcmp("clean", sub, subL)){
        rc |= ob_clean_command(interp, ctx, argc-1, argv+1, argl+1);
      }/* "ob get end" */
      else if(!rc && th_strlen(sub)==3 && 0==memcmp("end", sub, subL)){







|







2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
    return TH_ERROR;
  }else{
    int argPos = 2;
    char const * sub;
    int subL;
    int rc = TH_OK;
    Th_SetResult( interp, blob_str(b), b->nUsed );
    if(argc>argPos){
      sub = argv[argPos];
      subL = argl[argPos];
      /* "ob get clean" */
      if(!rc && th_strlen(sub)==5 && 0==memcmp("clean", sub, subL)){
        rc |= ob_clean_command(interp, ctx, argc-1, argv+1, argl+1);
      }/* "ob get end" */
      else if(!rc && th_strlen(sub)==3 && 0==memcmp("end", sub, subL)){