21a6584e8ecdbba6d802ab30f3ec564c08b7dcc3
galt
  Sat Jun 29 02:11:16 2013 -0700
fixing callers of sqlGetField to use sqlSafeFrag
diff --git src/hg/pdbSP/pdbSP.c src/hg/pdbSP/pdbSP.c
index a8114bb..fc72be0 100644
--- src/hg/pdbSP/pdbSP.c
+++ src/hg/pdbSP/pdbSP.c
@@ -81,31 +81,31 @@
 	*/
 	
 	chp = chp9 + 1;
 
 	more:
 	chp1 = strstr(chp, "?");
 	if (chp1 != NULL)
 	    {
 	    /* get SWISS-PROT accesion */
 	    chp1++;
 	    chp9 = strstr(chp1, "\"");
 	    *chp9 = '\0';
 	    spID = strdup(chp1);
 	
 	    /* get corresponding display ID from spXref3 table	*/
-	    sprintf(cond_str, "accession = '%s'", spID);
+	    sqlSafefFrag(cond_str, "accession = '%s'", spID);
             answer = sqlGetField(conn, proteinDB, "spXref3", "displayID", cond_str);
             if (answer != NULL)
                 {
                 displayID = strdup(answer);
                 }
 	    else
 		{
 		displayID = NULL;
 		}
 
 	    fprintf(outf, "%s\t%s\n", pdb, displayID);fflush(stdout);
 
 	    chp9 ++;
 	    chp = strstr(chp9, ",");
 	
@@ -121,31 +121,31 @@
 	}
     else
 	{
 	/* process the case of spill over lines */
 	
 	/* get accession number */
 	chp = line;
 	more2:
 	chp1 = strstr(chp, "?");
 	chp1++;
 	chp9 = strstr(chp1, "\"");
 	*chp9 = '\0';
 	spID = strdup(chp1);
 			
 	/* get display ID from spXref3 table */
-	sprintf(cond_str, "accession = '%s'", spID);
+	sqlSafefFrag(cond_str, "accession = '%s'", spID);
         answer = sqlGetField(conn, proteinDB, "spXref3", "displayID", cond_str);
         if (answer != NULL)
             {
             displayID = strdup(answer);
             }
 	else
 	    {
 	    displayID = NULL;
 	    }
 	fprintf(outf, "t%s\t%s\n", pdb,  displayID);fflush(stdout);
 
 	/* loop back if more */
 	chp9 ++;
 	chp = strstr(chp9, ",");
         if (chp != NULL)