Index: trunk/ippTools/src/pxadmin.c
===================================================================
--- trunk/ippTools/src/pxadmin.c	(revision 18797)
+++ trunk/ippTools/src/pxadmin.c	(revision 18850)
@@ -128,11 +128,14 @@
         psString dbName = psMetadataLookupStr(&status, config->modules->complete, "DBNAME");
 
-        fprintf (stdout, "*** delete the tables from database %s? ***\n", dbName);
-        fprintf (stdout, "*** to delete the tables, answer YES, and give password ***\n");
-        fprintf (stdout, "*** WARNING: this action is permanent ***\n\n");
-
-        fprintf (stdout, "delete the tables (YES/[n]): ");
-        fgets (line, 128, stdin);
-        sscanf (line, "%s", answer);
+        fprintf(stdout, "*** delete the tables from database %s? ***\n", dbName);
+        fprintf(stdout, "*** to delete the tables, answer YES, and give password ***\n");
+        fprintf(stdout, "*** WARNING: this action is permanent ***\n\n");
+
+        fprintf(stdout, "delete the tables (YES/[n]): ");
+        if (!fgets(line, 128, stdin)) {
+            psError(PS_ERR_IO, true, "Unable to read response.");
+            return false;
+        }
+        sscanf(line, "%s", answer);
         if (strcmp (answer, "YES"))  {
             psError(PS_ERR_UNKNOWN, true, "tables NOT deleleted");
@@ -140,7 +143,10 @@
         }
 
-        fprintf (stdout, "enter dbh connection password: ");
-        fgets (line, 128, stdin);
-        sscanf (line, "%s", answer);
+        fprintf(stdout, "enter dbh connection password: ");
+        if (!fgets(line, 128, stdin)) {
+            psError(PS_ERR_IO, true, "Unable to read response.");
+            return false;
+        }
+        sscanf(line, "%s", answer);
 
         psString dbPassword = psMetadataLookupStr(&status, config->modules->complete, "DBPASSWORD");
