src/hg/lib/customFactory.c 1.116
1.116 2010/02/10 20:28:05 hiram
limit custom tracks short label to 128 characters to avoid buffer overflow elsewhere
Index: src/hg/lib/customFactory.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/customFactory.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -b -B -U 4 -r1.115 -r1.116
--- src/hg/lib/customFactory.c 29 Jan 2010 21:49:46 -0000 1.115
+++ src/hg/lib/customFactory.c 10 Feb 2010 20:28:05 -0000 1.116
@@ -1696,10 +1696,10 @@
char *val;
if ((val = hashFindVal(hash, "name")) != NULL)
{
- if (*val)
- tdb->shortLabel = cloneString(val);
+ if (*val) /* limit shortLabel to 128 characters to avoid problems */
+ tdb->shortLabel = cloneStringZ(val,128);
else
tdb->shortLabel = cloneString("My Track");
stripChar(tdb->shortLabel,'"'); /* no quotes please */
stripChar(tdb->shortLabel,'\''); /* no quotes please */