Fossil

Check-in [0bc2a941]
Login

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

Overview
Comment:Avoid freeing memory that might not have been malloced in the "ticket" command with the --quote option. Ticket [6dba56543b89dc4].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0bc2a94104e68d4519f10f7fbf49e75f0e343587
User & Date: drh 2012-08-08 12:36:32
References
2012-08-08
12:52 Ticket [6dba5654] fossil ticket --quote segfaults when adding to the comment status still Open with 2 other changes artifact: 6bdcced7 user: rmax
Context
2012-08-08
12:41
If no uuid= query parameter is used for the /tarball or /zip URIs, then use the latest checkin (aka "tip"). Ticket [300fc543b24250e256867]. check-in: 8f002216 user: drh tags: trunk
12:36
Avoid freeing memory that might not have been malloced in the "ticket" command with the --quote option. Ticket [6dba56543b89dc4]. check-in: 0bc2a941 user: drh tags: trunk
11:25
Version 1.23 check-in: 957b17af user: drh tags: trunk, release, version-1.23
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/tkt.c.

1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
        if( strncmp(azField[i], "private_", 8)==0 ){
          zValue = db_conceal(zValue, strlen(zValue));
          blob_appendf(&tktchng, "J%s%s %s\n", zPfx, azField[i], zValue);
        }else{
          blob_appendf(&tktchng, "J%s%s %#F\n", zPfx,
                       azField[i], strlen(zValue), zValue);
        }
        if( tktEncoding == tktFossilize ){
          free(azValue[i]);
        }
      }
      blob_appendf(&tktchng, "K %s\n", zTktUuid);
      blob_appendf(&tktchng, "U %F\n", zUser);
      md5sum_blob(&tktchng, &cksum);
      blob_appendf(&tktchng, "Z %b\n", &cksum);
      rid = content_put(&tktchng);
      if( rid==0 ){







<
<
<







1164
1165
1166
1167
1168
1169
1170



1171
1172
1173
1174
1175
1176
1177
        if( strncmp(azField[i], "private_", 8)==0 ){
          zValue = db_conceal(zValue, strlen(zValue));
          blob_appendf(&tktchng, "J%s%s %s\n", zPfx, azField[i], zValue);
        }else{
          blob_appendf(&tktchng, "J%s%s %#F\n", zPfx,
                       azField[i], strlen(zValue), zValue);
        }



      }
      blob_appendf(&tktchng, "K %s\n", zTktUuid);
      blob_appendf(&tktchng, "U %F\n", zUser);
      md5sum_blob(&tktchng, &cksum);
      blob_appendf(&tktchng, "Z %b\n", &cksum);
      rid = content_put(&tktchng);
      if( rid==0 ){