Index: trunk/ippTools/src/disttool.c
===================================================================
--- trunk/ippTools/src/disttool.c	(revision 28269)
+++ trunk/ippTools/src/disttool.c	(revision 28270)
@@ -148,5 +148,5 @@
     PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false);
 
-    if (use_alternate) { 
+    if (use_alternate) {
         if (strcmp(stage, "raw")) {
             psError(PXTOOLS_ERR_SYS, true, "alternate inputs only supported for raw stage");
@@ -299,17 +299,17 @@
       query = pxDataGet("disttool_definebyquery_SSdiff.sql");
       if (!query) {
-	psError(PXTOOLS_ERR_SYS, false, "failed to retrieve SQL statement");
-	psFree(where);
-	return(false);
+        psError(PXTOOLS_ERR_SYS, false, "failed to retrieve SQL statement");
+        psFree(where);
+        return(false);
       }
 
       if (label) {
-	psStringAppend(&query, " AND (diffRun.label = '%s') ", label);
+        psStringAppend(&query, " AND (diffRun.label = '%s') ", label);
       }
       if (dist_group) {
-	psStringAppend(&query, " AND (diffRun.dist_group = '%s') ", dist_group);
+        psStringAppend(&query, " AND (diffRun.dist_group = '%s') ", dist_group);
       }
 
-      no_magic = true;    
+      no_magic = true;
     } else {
         psError(PS_ERR_UNKNOWN, true, "unknown value for stage: %s", stage);
@@ -537,5 +537,5 @@
 
     if (extraWhere) {
-        psStringAppend(&query, extraWhere);
+        psStringAppend(&query, "%s", extraWhere);
     }
     if (clean) {
@@ -1703,5 +1703,5 @@
         return false;
     }
-        
+
 
     PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
