| Ticket UUID: | 6dba56543b89dc41463174c63c9f11e798c9cfb4 | ||
| Title: | fossil ticket --quote segfaults when adding to the comment | ||
| Status: | Closed | Type: | Code_Defect |
| Severity: | Important | Priority: | |
| Subsystem: | Resolution: | Fixed | |
| Last Modified: | 2012-08-08 12:53:09 | ||
| Version Found In: | d982f8944c | ||
| Description & Comments: | |||
$ fossil new foo.fossil ... $ fossil ticket -R foo.fossil add title test ticket add succeeded for UID a0e7afe56ceaf2e28dfa79bc1db34aa2a767e7c1 $ fossil ticket -R foo.fossil change a0e7afe56 comment 'foo' --quote ticket set succeeded for UID a0e7afe56ceaf2e28dfa79bc1db34aa2a767e7c1 $ fossil ticket -R foo.fossil change a0e7afe56 +comment 'foo' --quote segmentation fault mistachkin added on 2012-08-08 03:47:31 UTC:
Index: src/tkt.c
==================================================================
--- src/tkt.c
+++ src/tkt.c
@@ -1167,11 +1167,11 @@
}else{
blob_appendf(&tktchng, "J%s%s %#F\n", zPfx,
azField[i], strlen(zValue), zValue);
}
if( tktEncoding == tktFossilize ){
- free(azValue[i]);
+ free(zFValue);
}
}
blob_appendf(&tktchng, "K %s\n", zTktUuid);
blob_appendf(&tktchng, "U %F\n", zUser);
md5sum_blob(&tktchng, &cksum);
rmax added on 2012-08-08 11:18:20 UTC: drh added on 2012-08-08 12:35:16 UTC: The simplest and safest fix is to simply omit the free() call. rmax added on 2012-08-08 12:52:38 UTC: | |||
Attachments:
- fossil-6dba56543b89dc41-1.patch added by rmax on 2012-08-07 11:28:52. [details]