瀏覽代碼

Merge pull request #509 from mackron/patch-1

Fix a buffer overflow in the OSS/BSD backend of mini_al.
pull/510/head
Ray 7 年之前
committed by GitHub
父節點
當前提交
aab6c11ce1
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/external/mini_al.h

+ 1
- 1
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);

Loading…
取消
儲存