oss_get_version() passes &version to ioctl(), but version is already an int*, so &version is int** which writes to the wrong address on the stack. Pass version directly.
Reported-by: Pavee Hui <[email protected]> Fixes: 72ff25e4e98d ("Workaround for broken OSS_GETVERSION on FreeBSD, part two") Signed-off-by: Marc-André Lureau <[email protected]> --- audio/ossaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 63c6e0a291f1..95a07ea1cace 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -204,7 +204,7 @@ static int oss_to_audfmt (int ossfmt, AudioFormat *fmt, bool *big_endian) #ifdef USE_DSP_POLICY static int oss_get_version (int fd, int *version, const char *typ) { - if (ioctl (fd, OSS_GETVERSION, &version)) { + if (ioctl(fd, OSS_GETVERSION, version)) { #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) /* * Looks like atm (20100109) FreeBSD knows OSS_GETVERSION -- 2.56.0.rc0.29.g47ce80527c56
