aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound/pcm/sndstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/pcm/sndstat.c')
-rw-r--r--sys/dev/sound/pcm/sndstat.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index ef006a580d40..bbcb2fda7c29 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -51,7 +51,6 @@
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/pcm.h>
-#include <dev/sound/version.h>
#include "feeder_if.h"
@@ -706,7 +705,7 @@ sndstat_unpack_user_nvlbuf(const void *unvlbuf, size_t nbytes, nvlist_t **nvl)
}
*nvl = nvlist_unpack(nvlbuf, nbytes, 0);
free(nvlbuf, M_DEVBUF);
- if (nvl == NULL) {
+ if (*nvl == NULL) {
return (EINVAL);
}
@@ -865,6 +864,11 @@ sndstat_add_user_devs(struct sndstat_file *pf, caddr_t data)
goto done;
}
+ if (arg->nbytes > SNDST_UNVLBUF_MAX) {
+ err = ENOMEM;
+ goto done;
+ }
+
err = sndstat_unpack_user_nvlbuf(arg->buf, arg->nbytes, &nvl);
if (err != 0)
goto done;
@@ -1271,11 +1275,8 @@ sndstat_prepare(struct sndstat_file *pf_self)
/* make sure buffer is reset */
sbuf_clear(s);
- if (snd_verbose > 0) {
- sbuf_printf(s, "FreeBSD Audio Driver (%ubit %d/%s)\n",
- (u_int)sizeof(intpcm32_t) << 3, SND_DRV_VERSION,
- MACHINE_ARCH);
- }
+ if (snd_verbose > 0)
+ sbuf_printf(s, "FreeBSD Audio Driver\n");
/* generate list of installed devices */
k = 0;