Fix buffer overflow in GLBackend#638
Fix buffer overflow in GLBackend#638gabrielOFlores wants to merge 0 commit intoOverload-Technologies:mainfrom
Conversation
|
I've been doing some research, and it seems like since OpenGL 3.0, the safest option is to use:
Since we already have functions using the bool GetBool(uint32_t parameter);
int GetInt(uint32_t parameter);
int64_t GetInt64(uint32_t parameter);
float GetFloat(uint32_t parameter);
double GetDouble(uint32_t parameter);And update these to have a default index of bool GetBool(uint32_t parameter, uint32_t p_index = 0);
int GetInt(uint32_t parameter, uint32_t p_index = 0);
int64_t GetInt64(uint32_t parameter, uint32_t p_index = 0);
float GetFloat(uint32_t parameter, uint32_t p_index = 0);
double GetDouble(uint32_t parameter, uint32_t p_index = 0);Important I've tested this locally and it didn't work. I must be misunderstanding something in the |
adriengivry
left a comment
There was a problem hiding this comment.
See comment above.
Note
You can keep this PR open and push the edits to your branch. No need to create a new PR!
adriengivry
left a comment
There was a problem hiding this comment.
It seems like you added the dedicated GPU commit to this PR by mistake. Can you revert this commit?
Description
Fix for Buffer Overflow by limiting the number of integers in GLint:
Related Issue(s)
Fixes #634
Checklist
See also
Why a fixed size of 4?