1f55f129858863d78076fd3818d3841429741121
galt
  Mon Jan 29 01:35:45 2018 -0800
Fixing bug: sqlDyStringAppend() is not safe, and it is not needed. Using sqlDyStringPrintf instead.

diff --git src/hg/lib/visiGene.c src/hg/lib/visiGene.c
index 9ed7616..e9c203b 100644
--- src/hg/lib/visiGene.c
+++ src/hg/lib/visiGene.c
@@ -675,31 +675,31 @@
 dyStringClear(dy);
 sqlDyStringPrintf(dy, "select gene from geneSynonym where name ");
 appendMatchHow(dy, name, how);
 sr = sqlGetResult(conn, dy->string);
 while ((row = sqlNextRow(sr)) != NULL)
     {
     geneEl = slNameNew(row[0]);
     slAddHead(&geneList, geneEl);
     }
 slReverse(&geneList);
 sqlFreeResult(&sr);
 
 for (geneEl = geneList; geneEl != NULL; geneEl = geneEl->next)
     {
     dyStringClear(dy);
-    sqlDyStringAppend(dy, "select imageProbe.image from probe,imageProbe");
+    sqlDyStringPrintf(dy, "select imageProbe.image from probe,imageProbe");
     dyStringPrintf(dy, " where probe.gene = %s ", geneEl->name);
     dyStringAppend(dy, " and probe.id = imageProbe.probe");
     sr = sqlGetResult(conn, dy->string);
     while ((row = sqlNextRow(sr)) != NULL)
         {
 	char *ids = row[0];
 	if (!hashLookup(uniqHash, ids))
 	    {
 	    hashAdd(uniqHash, ids, NULL);
 	    imageEl = slIntNew(sqlUnsigned(ids));
 	    slAddHead(&imageList, imageEl);
 	    }
 	}
     sqlFreeResult(&sr);
     }