summaryrefslogtreecommitdiff
path: root/misc/kdeedu3/patches/patch-ag
blob: 557eace2f8c9af29a18170b158c6839fff8b4fef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-ag,v 1.1.2.2 2005/02/20 18:45:05 snj Exp $

--- kstars/kstars/indiproperty.cpp.orig	2004-07-18 05:52:57.000000000 +1200
+++ kstars/kstars/indiproperty.cpp
@@ -521,7 +521,7 @@ int INDI_P::buildMenuGUI(XMLEle *root, c
 
 	    if (pg->dp->crackSwitchState (pcdataXMLEle(sep), &(lp->state)) < 0)
 	    {
-		sprintf (errmsg, "INDI: <%s> unknown state %s for %s %s %s",
+		snprintf (errmsg, ERRMSG_SIZE, "INDI: <%.64s> unknown state %.64s for %.64s %.64s %.64s",
 			    tagXMLEle(root), valuXMLAtt(ap), name.ascii(), lp->name.ascii(), name.ascii());
 		return (-1);
 	    }
@@ -532,7 +532,7 @@ int INDI_P::buildMenuGUI(XMLEle *root, c
 	    {
 		if (onItem != -1)
 		{
-		    sprintf (errmsg,"INDI: <%s> %s %s has multiple On switches",
+		    snprintf (errmsg, ERRMSG_SIZE, "INDI: <%.64s> %.64s %.64s has multiple On switches",
 					tagXMLEle(root), name.ascii(), lp->name.ascii());
 		    return (-1);
 		}
@@ -602,7 +602,7 @@ int INDI_P::buildSwitchesGUI(XMLEle *roo
 
 	    if (pg->dp->crackSwitchState (pcdataXMLEle(sep), &(lp->state)) < 0)
 	    {
-		sprintf (errmsg, "INDI: <%s> unknown state %s for %s %s %s",
+		snprintf (errmsg, ERRMSG_SIZE, "INDI: <%.64s> unknown state %.64s for %.64s %.64s %.64s",
 			    tagXMLEle(root), valuXMLAtt(ap), name.ascii(), name.ascii(), lp->name.ascii());
 		return (-1);
 	    }
@@ -700,7 +700,7 @@ int INDI_P::buildLightsGUI(XMLEle *root,
 
 	   if (pg->dp->crackLightState (pcdataXMLEle(lep), &lp->state) < 0)
 	    {
-		sprintf (errmsg, "INDI: <%s> unknown state %s for %s %s %s",
+		snprintf (errmsg, ERRMSG_SIZE, "INDI: <%.64s> unknown state %.64s for %.64s %.64s %.64s",
 			    tagXMLEle(root), valuXMLAtt(ap), pg->dp->name.ascii(), name.ascii(), sname.ascii());
 		return (-1);
 	   }