$OpenBSD: patch-src_WSoundPrefs_c,v 1.1.1.1 2001/01/09 21:01:14 naddy Exp $
--- src/WSoundPrefs.c.orig	Sat Mar  4 11:46:11 2000
+++ src/WSoundPrefs.c	Tue Jan  9 21:43:41 2001
@@ -431,7 +431,7 @@ Initialize(WMScreen *scr)
 		panel->versionL = WMCreateLabel(panel->infoFrm);
 		WMResizeWidget(panel->versionL, 216, 12);
 		WMMoveWidget(panel->versionL, 6, 10);
-		sprintf(text, "WSoundPrefs %s for WM %s", WVERSION, WMVERSION);
+		snprintf(text, sizeof(text), "WSoundPrefs %s for WM %s", WVERSION, WMVERSION);
 		WMSetLabelText(panel->versionL, text);
 		WMSetLabelTextAlignment(panel->versionL, WALeft);
 		WMSetLabelFont(panel->versionL, font);
@@ -440,7 +440,7 @@ Initialize(WMScreen *scr)
 		panel->wingsL = WMCreateLabel(panel->infoFrm);
 		WMResizeWidget(panel->wingsL, 216, 12);
 		WMMoveWidget(panel->wingsL, 6, 24);
-		sprintf(text, "WINGs Version %d", sysinfo->WINGsVersion);
+		snprintf(text, sizeof(text), "WINGs Version %d", sysinfo->WINGsVersion);
 		WMSetLabelText(panel->wingsL, text);
 		WMSetLabelTextAlignment(panel->wingsL, WALeft);
 		WMSetLabelFont(panel->wingsL, font);
@@ -449,7 +449,7 @@ Initialize(WMScreen *scr)
 		panel->vendorL = WMCreateLabel(panel->infoFrm);
 		WMResizeWidget(panel->vendorL, 136, 12);
 		WMMoveWidget(panel->vendorL, 6, 38);
-		sprintf(text, "Window Server %d", sysinfo->VendorRelease);
+		snprintf(text, sizeof(text), "Window Server %d", sysinfo->VendorRelease);
 		WMSetLabelText(panel->vendorL, text);
 		WMSetLabelTextAlignment(panel->vendorL, WALeft);
 		WMSetLabelFont(panel->vendorL, font);
@@ -458,7 +458,7 @@ Initialize(WMScreen *scr)
 		panel->osL = WMCreateLabel(panel->infoFrm);
 		WMResizeWidget(panel->osL, 216, 12);
 		WMMoveWidget(panel->osL, 226,  10);
-		sprintf(text, "%s %s", sysinfo->SystemName, sysinfo->SystemRelease);
+		snprintf(text, sizeof(text), "%s %s", sysinfo->SystemName, sysinfo->SystemRelease);
 		WMSetLabelText(panel->osL, text);
 		WMSetLabelTextAlignment(panel->osL, WARight);
 		WMSetLabelFont(panel->osL, font);
@@ -467,7 +467,7 @@ Initialize(WMScreen *scr)
 		panel->cpuL = WMCreateLabel(panel->infoFrm);
 		WMResizeWidget(panel->cpuL, 216, 12);
 		WMMoveWidget(panel->cpuL, 226,  24);
-		sprintf(text, "Processor: %s", sysinfo->Processor);
+		snprintf(text, sizeof(text), "Processor: %s", sysinfo->Processor);
 		WMSetLabelText(panel->cpuL, text);
 		WMSetLabelTextAlignment(panel->cpuL, WARight);
 		WMSetLabelFont(panel->cpuL, font);
@@ -476,7 +476,7 @@ Initialize(WMScreen *scr)
 		panel->userL = WMCreateLabel(panel->infoFrm);
 		WMResizeWidget(panel->userL, 272, 12);
 		WMMoveWidget(panel->userL, 442 - WMWidgetWidth(panel->userL) ,  38);
-		sprintf(text, "%s@%s", sysinfo->User, sysinfo->Host);
+		snprintf(text, sizeof(text), "%s@%s", sysinfo->User, sysinfo->Host);
 		WMSetLabelText(panel->userL, text);
 		WMSetLabelTextAlignment(panel->userL, WARight);
 		WMSetLabelFont(panel->userL, font); 
@@ -512,11 +512,11 @@ loadConfigurations(WMScreen *scr, WMWind
 		if (!PLIsDictionary(db)) {
 			PLRelease(db);
 			db = NULL;
-			sprintf(mbuf, _("WMSound domain (%s) is corrupted!"), path);
+			snprintf(mbuf, sizeof(mbuf), _("WMSound domain (%s) is corrupted!"), path);
 			WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
 		}
 	} else {
-		sprintf(mbuf, _("Could not load WMSound domain (%s) from defaults database."), path);
+		snprintf(mbuf, sizeof(mbuf), _("Could not load WMSound domain (%s) from defaults database."), path);
 		WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
 	}
 	free(path);
