Index: trunk/Ohana/src/imregister/base/ConfigInit.c
===================================================================
--- trunk/Ohana/src/imregister/base/ConfigInit.c	(revision 25757)
+++ trunk/Ohana/src/imregister/base/ConfigInit.c	(revision 42389)
@@ -6,7 +6,7 @@
 
   int i, NDB;
-  char *config, *file, ElixirBase[80], catdir[256];
-  char CatdirPhotcodeFile[256];
-  char MasterPhotcodeFile[256];
+  char *config, *file, ElixirBase[80], catdir[MY_MAX_PATH];
+  char CatdirPhotcodeFile[MY_MAX_PATH];
+  char MasterPhotcodeFile[MY_MAX_PATH];
 
   /*** load configuration info ***/
@@ -28,5 +28,5 @@
   WarnConfig (config, "CATDIR",                      "%s", 0, catdir);
   WarnConfig (config, "PHOTCODE_FILE",               "%s", 0, MasterPhotcodeFile);
-  sprintf (ImPhotDB, "%s/Images.dat", catdir);
+  snprintf_nowarn (ImPhotDB, MY_MAX_PATH, "%s/Images.dat", catdir);
 
   /* small text databases: filters, camera defs */ 
@@ -75,10 +75,10 @@
 						   
   WarnConfig (config, "imstats",                     "%s", 0, ElixirBase);
-  sprintf (ImstatFifo, "%s.photcode", ElixirBase);   
+  snprintf_nowarn (ImstatFifo, MY_MAX_PATH, "%s.photcode", ElixirBase);   
   WarnConfig (config, "ptolemy",                     "%s", 0, ElixirBase);
-  sprintf (PtolemyFifo, "%s.photcode", ElixirBase);
+  snprintf_nowarn (PtolemyFifo, MY_MAX_PATH, "%s.photcode", ElixirBase);
 
   if (!ScanConfig (config, "CONNECT", "%s",  0, CONNECT)) {
-    sprintf (CONNECT, "/usr/bin/rsh");
+    snprintf_nowarn (CONNECT, 64, "/usr/bin/rsh");
   }
 
@@ -87,5 +87,5 @@
   NDetrendAltDB = 0;
   ALLOCATE (DetrendAltDB, char *, NDB);
-  ALLOCATE (DetrendAltDB[NDetrendAltDB], char, 256);
+  ALLOCATE (DetrendAltDB[NDetrendAltDB], char, MY_MAX_PATH);
   for (i = 1; ScanConfig (config, "DETREND_ALT_DB", "%s", i, DetrendAltDB[NDetrendAltDB]); i++) {
     NDetrendAltDB ++;
@@ -94,5 +94,5 @@
       REALLOCATE (DetrendAltDB, char *, NDB);
     }
-    ALLOCATE (DetrendAltDB[NDetrendAltDB], char, 256);
+    ALLOCATE (DetrendAltDB[NDetrendAltDB], char, MY_MAX_PATH);
   }
   free (DetrendAltDB[NDetrendAltDB]);
@@ -104,5 +104,5 @@
 
   /* XXX this does not yet write out the master photcode table */
-  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", catdir);
+  snprintf_nowarn (CatdirPhotcodeFile, MY_MAX_PATH, "%s/Photcodes.dat", catdir);
   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
