File aumix-overflow.patch of Package aumix

--- aumix-2.8/src/common.c.xx	2005-04-26 16:22:50.331894225 +0200
+++ aumix-2.8/src/common.c	2005-04-26 16:23:19.775128489 +0200
@@ -612,17 +612,18 @@
 int             SetShowNoninter(int dev)
 {
 /* Change or display settings from the command line. */
-	char           *devstr, dest;
+	char           *devstr, dest[4];
 	int             change = 0, tmp, left, right;
 	/* Increase or decrease levels, optionally by a number. */
 	if (!strncmp(optarg, "+", 1) || !strncmp(optarg, "-", 1)) {
 		ErrorExitWarn(ReadLevel(dev, &tmp), 'e');
 		right = tmp >> 8;	/* I'll take the high byte, */
 		left = tmp & 0xFF;	/* and you take the low byte. */
-		strncpy(&dest, (optarg + 1), 3);
+		memset(dest,0,sizeof(dest));
+		strncpy(dest, (optarg + 1), 3);
 		change = 1;	/* For compatibility with versions 1.15 to 1.17, assume one if no number was given. */
-		if (atoi(&dest))
-			change = atoi(&dest);
+		if (atoi(dest))
+			change = atoi(dest);
 		if (*optarg == '+') {	/* increase */
 			right += change;
 			left += change;
openSUSE Build Service is sponsored by