aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Reid <mackron@gmail.com>2018-03-18 14:37:41 +1000
committerGitHub <noreply@github.com>2018-03-18 14:37:41 +1000
commit4a69c2d75e2b24686fbaf46b7fb9e2e8fa283b7a (patch)
treeca4d066ffb7ccb27c28af713eb86ec4fe8e2fb66 /src
parent61e0e4b4f37cc66135445bc87af7c92399fa69ee (diff)
downloadraylib-4a69c2d75e2b24686fbaf46b7fb9e2e8fa283b7a.tar.gz
raylib-4a69c2d75e2b24686fbaf46b7fb9e2e8fa283b7a.zip
Fix a buffer overflow in the OSS/BSD backend.
Diffstat (limited to 'src')
-rw-r--r--src/external/mini_al.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/external/mini_al.h b/src/external/mini_al.h
index 1374de5b..6f532ad8 100644
--- a/src/external/mini_al.h
+++ b/src/external/mini_al.h
@@ -6974,7 +6974,7 @@ static mal_result mal_device_init__oss(mal_context* pContext, mal_device_type ty
// When not using MMAP mode, we need to use an intermediary buffer for the client <-> device transfer. We do
// everything by the size of a fragment.
- pDevice->oss.pIntermediaryBuffer = mal_malloc(fragmentSizeInBytes);
+ pDevice->oss.pIntermediaryBuffer = mal_malloc(actualFragmentSizeInBytes);
if (pDevice->oss.pIntermediaryBuffer == NULL) {
close(pDevice->oss.fd);
return mal_post_error(pDevice, "[OSS] Failed to allocate memory for intermediary buffer.", MAL_OUT_OF_MEMORY);