080a160c7b9595d516c9c70e83689a09b60839d0 galt Mon Jun 3 12:16:53 2013 -0700 fix SQL Injection diff --git src/hg/lib/synteny100000.c src/hg/lib/synteny100000.c index 209a5c2..d6fcd5e 100644 --- src/hg/lib/synteny100000.c +++ src/hg/lib/synteny100000.c @@ -54,31 +54,31 @@ lineFileClose(&lf); slReverse(&list); return list; } struct synteny100000 *synteny100000LoadWhere(struct sqlConnection *conn, char *table, char *where) /* Load all synteny100000 from table that satisfy where clause. The * where clause may be NULL in which case whole table is loaded * Dispose of this with synteny100000FreeList(). */ { struct synteny100000 *list = NULL, *el; struct dyString *query = dyStringNew(256); struct sqlResult *sr; char **row; -dyStringPrintf(query, "select * from %s", table); +sqlDyStringPrintf(query, "select * from %s", table); if (where != NULL) dyStringPrintf(query, " where %s", where); sr = sqlGetResult(conn, query->string); while ((row = sqlNextRow(sr)) != NULL) { el = synteny100000Load(row); slAddHead(&list, el); } slReverse(&list); sqlFreeResult(&sr); dyStringFree(&query); return list; } struct synteny100000 *synteny100000CommaIn(char **pS, struct synteny100000 *ret)