Skip to content

Commit bcc3efb

Browse files
avernefincs
authored andcommitted
dkCmdBufPushConstants: check for pushbuffer overflow
1 parent a51e762 commit bcc3efb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

source/maxwell/gpu_base.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ void dkCmdBufPushConstants(DkCmdBuf obj, DkGpuAddr uboAddr, uint32_t uboSize, ui
148148
DK_DEBUG_BAD_INPUT(uboSize > DK_UNIFORM_BUF_MAX_SIZE);
149149
DK_DEBUG_DATA_ALIGN(offset, 4);
150150
DK_DEBUG_SIZE_ALIGN(size, 4);
151+
DK_DEBUG_BAD_INPUT(size > 0x7FFC);
151152
DK_DEBUG_BAD_INPUT((offset >= uboSize) || (size > uboSize));
152153
DK_DEBUG_BAD_INPUT((offset + size) > uboSize);
153154
DK_DEBUG_NON_NULL(data);

0 commit comments

Comments
 (0)