e81403a315a24af601884b8a19e89bcecc92f267
galt
  Sat Dec 8 20:04:28 2018 -0800
Fixing hFindSplitTable and its use. Standard size, give real string size so no undetected overflows. Test result and abort if not found. Avoids SQL errors that otherwise will popup. Handles uninitialzed stack better for the output name. refs #22596.

diff --git src/hg/hgGene/altSplice.c src/hg/hgGene/altSplice.c
index e2d634e..8d046c4 100644
--- src/hg/hgGene/altSplice.c
+++ src/hg/hgGene/altSplice.c
@@ -130,34 +130,35 @@
     if ((mark = strrchr((char *)section->items, '-')) != NULL)
         *mark = '\0';
 return section->items != NULL;
 }
 
 
 static void altSplicePrint(struct section *section,
 	struct sqlConnection *conn, char *geneId)
 /* Print out altSplicing info. */
 {
 char *altId = section->items;
 char query[256];
 struct sqlResult *sr;
 char **row;
 struct altGraphX *ag;
-char table[64];
+char table[HDB_MAX_TABLE_STRING];
 boolean hasBin;
 
-hFindSplitTable(sqlGetDatabase(conn), curGeneChrom, "altGraphX", table, &hasBin);
+if (!hFindSplitTable(sqlGetDatabase(conn), curGeneChrom, "altGraphX", table, sizeof table, &hasBin))
+    errAbort("track altGraphX not found");
 sqlSafef(query, sizeof(query), "select * from %s where name='%s'", table, altId);
 sr = sqlGetResult(conn, query);
 if ((row = sqlNextRow(sr)) != NULL)
     {
     ag = altGraphXLoad(row+hasBin);
     hPrintf("<TABLE><TR><TD BGCOLOR='#888888'>\n");
     altGraphXMakeImage(ag);
     hPrintf("</TD></TR></TABLE><BR>");
     }
 sqlFreeResult(&sr);
 hPrintf("This graph shows alternative splicing observed in mRNAs and "
         "ESTs that is either conserved in mouse, present in full length "
 	"mRNAs, or observed at least three times in ESTs.");
 }