080a160c7b9595d516c9c70e83689a09b60839d0 galt Mon Jun 3 12:16:53 2013 -0700 fix SQL Injection diff --git src/hg/lib/tilingPath.c src/hg/lib/tilingPath.c index 56d91f4..6710e9b 100644 --- src/hg/lib/tilingPath.c +++ src/hg/lib/tilingPath.c @@ -52,31 +52,31 @@ lineFileClose(&lf); slReverse(&list); return list; } struct tilingPath *tilingPathLoadWhere(struct sqlConnection *conn, char *table, char *where) /* Load all tilingPath from table that satisfy where clause. The * where clause may be NULL in which case whole table is loaded * Dispose of this with tilingPathFreeList(). */ { struct tilingPath *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 = tilingPathLoad(row); slAddHead(&list, el); } slReverse(&list); sqlFreeResult(&sr); dyStringFree(&query); return list; } struct tilingPath *tilingPathCommaIn(char **pS, struct tilingPath *ret)