afffac65ec2d51d24a2c0d779e3c44e41760f1ab
galt
  Fri May 27 10:21:32 2022 -0700
minor fix for NOSQLINJv2. needed to use sql safe functions.

diff --git src/hg/hgTracks/wigMafTrack.c src/hg/hgTracks/wigMafTrack.c
index 23eb470..4528e18 100644
--- src/hg/hgTracks/wigMafTrack.c
+++ src/hg/hgTracks/wigMafTrack.c
@@ -1076,41 +1076,41 @@
 int rowOffset = 0;
 struct hash *componentHash = newHash(6);
 struct hashEl *hel;
 struct dyString *where = dyStringNew(256);
 char *whereClause = NULL;
 
 if (miList == NULL)
     return FALSE;
 
 if (snpTable == NULL)
     return FALSE;
 
 /* Create SQL where clause that will load up just the
  * beds for the species that we are including. */
 conn = hAllocConn(database);
-dyStringAppend(where, "name in (");
+sqlDyStringPrintf(where, "name in (");
 for (mi = miList; mi != NULL; mi = mi->next)
     {
     if (!isPairwiseItem(mi))
 	/* exclude non-species items (e.g. conservation wiggle */
 	continue;
-    dyStringPrintf(where, "'%s'", mi->db);
+    sqlDyStringPrintf(where, "'%s'", mi->db);
     if (mi->next != NULL)
-	dyStringAppend(where, ",");
+	sqlDyStringPrintf(where, ",");
     }
-dyStringAppend(where, ")");
+sqlDyStringPrintf(where, ")");
 /* check for empty where clause */
 if (!sameString(where->string,"name in ()"))
     whereClause = where->string;
 sr = hOrderedRangeQuery(conn, snpTable, chromName, seqStart, seqEnd,
                         whereClause, &rowOffset);
 
 /* Loop through result creating a hash of lists of beds .
  * The hash is keyed by species. */
 while ((row = sqlNextRow(sr)) != NULL)
     {
     struct bed *bed = bedLoadN(&row[1], 5);
     /* prune to fit in window bounds */
     if (bed->chromStart < seqStart)
         bed->chromStart = seqStart;
     if (bed->chromEnd > seqEnd)