Index: /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/include/prototypes.h
===================================================================
--- /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/include/prototypes.h	(revision 30441)
+++ /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/include/prototypes.h	(revision 30442)
@@ -175,5 +175,5 @@
 void          DrawBitmap          PROTO((Graphic *graphic, int x, int y, int dx, int dy, char *bitmap, int mode));
 void          CrossHairs          PROTO((Graphic *graphic, Picture *image));
-void          hh_hms              PROTO((char *line, double ra, double dec, char sep));
+void          hh_hms              PROTO((char *line, double ra, double dec, char sep, int Nchar));
 
 int           SetColormap         PROTO((char *name));
Index: /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/src/UpdateStatusBox.c
===================================================================
--- /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/src/UpdateStatusBox.c	(revision 30441)
+++ /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/src/UpdateStatusBox.c	(revision 30442)
@@ -20,5 +20,5 @@
   
     bzero (line, 100);
-    sprintf (line, "(%d x %d) @ %d                                         ", 
+    snprintf (line, 100, "(%d x %d) @ %d                                         ", 
 	     image[0].picture.dx, image[0].picture.dy, image[0].picture.expand); 
     XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
@@ -26,10 +26,10 @@
     
     bzero (line, 100);
-    sprintf (line, "%-25s", image[0].image[0].file); 
+    snprintf (line, 100, "%-25s", image[0].image[0].file); 
     XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 		 image[0].text_x + PAD1, image[0].text_y + 5*textpad + 5*PAD1, line, strlen(line));
     
     bzero (line, 100);
-    sprintf (line, "(%s)                                          ", image[0].image[0].name); 
+    snprintf (line, 100, "(%s)                                          ", image[0].image[0].name); 
     XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 		 image[0].text_x + PAD1, image[0].text_y + 6*textpad + 6*PAD1, line, 25);
@@ -45,7 +45,7 @@
 
   if (image[0].HexValue) {
-    sprintf (line, "%04x", (int) z);
+      snprintf (line, 100, "%04x", (int) z);
   } else {
-    sprintf (line, "%22.3f", z);
+      snprintf (line, 100, "%22.3f", z);
   }
   XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
@@ -53,5 +53,5 @@
   
   bzero (line, 100);
-  sprintf (line, "%10.2f %10.2f", x, y);
+  snprintf (line, 100, "%10.2f %10.2f", x, y);
   XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 	       image[0].text_x + PAD1, image[0].text_y + 2*textpad + 2*PAD1, line, strlen(line));
@@ -59,8 +59,9 @@
   bzero (line, 100);
   if (image[0].DecimalDegrees) {
-    sprintf (line, "%10.6f %10.6f", ra, dec); 
+    snprintf (line, 100, "%10.6f %10.6f", ra, dec); 
   } else {
-    hh_hms (line, ra, dec, ':');
+    hh_hms (line, ra, dec, ':', 100);
   }
+
   XDrawString (graphic[0].display, graphic[0].window, graphic[0].gc, 
 	       image[0].text_x + PAD1, image[0].text_y + 3*textpad + 3*PAD1, line, strlen(line));
Index: /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/src/hh_hms.c
===================================================================
--- /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/src/hh_hms.c	(revision 30441)
+++ /branches/eam_branches/ipp-20101205/Ohana/src/kapa2/src/hh_hms.c	(revision 30442)
@@ -1,5 +1,5 @@
 # include "Ximage.h"
 
-void hh_hms (char *line, double ra, double dec, char sep) {
+void hh_hms (char *line, double ra, double dec, char sep, int Nchar) {
 
   int h, m, flag;
@@ -13,7 +13,7 @@
   s = 3600*(ra - h - m / 60.0);
   if (flag > 0)
-    sprintf (line, " %02d%c%02d%c%04.1f  ", h, sep, m, sep, s);
+    snprintf (line, Nchar, " %02d%c%02d%c%04.1f  ", h, sep, m, sep, s);
   else
-    sprintf (line, "-%02d%c%02d%c%04.1f  ", h, sep, m, sep, s);
+    snprintf (line, Nchar, "-%02d%c%02d%c%04.1f  ", h, sep, m, sep, s);
   
   flag = SIGN(dec);
@@ -23,6 +23,6 @@
   s = 3600*(dec - h - m / 60.0);
   if (flag > 0)
-    sprintf (&line[13], " %02d%c%02d%c%04.1f", h, sep, m, sep, s);
+    snprintf (&line[13], Nchar, " %02d%c%02d%c%04.1f", h, sep, m, sep, s);
   else
-    sprintf (&line[13], "-%02d%c%02d%c%04.1f", h, sep, m, sep, s);
+    snprintf (&line[13], Nchar, "-%02d%c%02d%c%04.1f", h, sep, m, sep, s);
 }
