src/hg/hgCustom/hgCustom.c 1.137

1.137 2010/02/03 18:48:58 angie
Increased some char[] sizes that caused safef errors with custom track with name longer than 128, and some others that looked like they might.
Index: src/hg/hgCustom/hgCustom.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgCustom/hgCustom.c,v
retrieving revision 1.136
retrieving revision 1.137
diff -b -B -U 4 -r1.136 -r1.137
--- src/hg/hgCustom/hgCustom.c	13 Jan 2010 19:19:52 -0000	1.136
+++ src/hg/hgCustom/hgCustom.c	3 Feb 2010 18:48:58 -0000	1.137
@@ -378,9 +378,9 @@
 if (isUpdateForm)
     {
     /* hidden variables to identify track */
     cgiMakeHiddenVar(hgCtUpdatedTable, ct->tdb->tableName);
-    char buf[256];
+    char buf[512];
     char *shortLabel = htmlEncode(ct->tdb->shortLabel);
     char *longLabel = htmlEncode(ct->tdb->longLabel);
     safef(buf, sizeof buf, "track name='%s' description='%s'",
 				shortLabel, longLabel);
@@ -777,9 +777,9 @@
                         cartSetString(cart, "hgt.visAllFromCt", command);
                         }
                     else
                         {
-                        char buf[128];
+                        char buf[256];
                         safef(buf, sizeof buf, "hgtct.%s", s);
                         cartSetString(cart, buf, command);
                         }
 		    }
@@ -881,9 +881,9 @@
 {
 struct customTrack *ct;
 for (ct = ctList; ct != NULL; ct = ct->next)
     {
-    char var[128];
+    char var[256];
     safef(var, sizeof var, "%s_%s", hgCtDeletePrefix, ct->tdb->tableName);
     if (cartBoolean(cart, var))
 	slRemoveEl(&ctList, ct);
     }
@@ -897,9 +897,9 @@
 struct customTrack *refreshCts = NULL;
 
 for (ct = ctList; ct != NULL; ct = ct->next)
     {
-    char var[128];
+    char var[256];
     safef(var, sizeof var, "%s_%s", hgCtRefreshPrefix, ct->tdb->tableName);
     if (cartUsualBoolean(cart, var, FALSE))
 	{
 	struct customTrack *nextCt = NULL, *urlCt = NULL;