summaryrefslogtreecommitdiff
path: root/audio/mpg321/patches/patch-ao.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/mpg321/patches/patch-ao.c')
-rw-r--r--audio/mpg321/patches/patch-ao.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/audio/mpg321/patches/patch-ao.c b/audio/mpg321/patches/patch-ao.c
new file mode 100644
index 00000000000..90c13765fcb
--- /dev/null
+++ b/audio/mpg321/patches/patch-ao.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-ao.c,v 1.1 2016/06/02 09:18:19 jperkin Exp $
+
+Ensure structs are zero'd before use.
+
+--- ao.c.orig 2012-03-25 12:27:49.000000000 +0000
++++ ao.c
+@@ -299,6 +299,7 @@ void open_ao_playdevice(struct mad_heade
+ and restore it afterwards */
+ signal(SIGINT, SIG_DFL);
+
++ memset(&format, 0, sizeof(format));
+ format.bits = 16;
+ format.rate = header->samplerate;
+ format.channels = (options.opt & MPG321_FORCE_STEREO) ? 2 : MAD_NCHANNELS(header);