diff options
Diffstat (limited to 'media-sound/aumix/files/aumix-2.8-noninter_strncpy.patch')
-rw-r--r-- | media-sound/aumix/files/aumix-2.8-noninter_strncpy.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/media-sound/aumix/files/aumix-2.8-noninter_strncpy.patch b/media-sound/aumix/files/aumix-2.8-noninter_strncpy.patch new file mode 100644 index 000000000000..2c68873c29ae --- /dev/null +++ b/media-sound/aumix/files/aumix-2.8-noninter_strncpy.patch @@ -0,0 +1,26 @@ +diff -ur aumix-2.8.orig/src/common.c aumix-2.8/src/common.c +--- aumix-2.8.orig/src/common.c 2002-10-29 23:27:51.000000000 +0200 ++++ aumix-2.8/src/common.c 2009-05-12 14:36:08.000000000 +0300 +@@ -612,17 +612,18 @@ + int SetShowNoninter(int dev) + { + /* Change or display settings from the command line. */ +- char *devstr, dest; ++ char *devstr; ++ char 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); ++ 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; |