mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-10 21:33:38 +00:00
Fixed bounds check for cursor image
This commit is contained in:
@@ -173,7 +173,7 @@ KVM_MouseCursors kvm_fetch_currentCursor(Display *cursordisplay)
|
||||
char alpha[65535];
|
||||
int i;
|
||||
|
||||
if ((size_t)(w*h) <= sizeof(alpha))
|
||||
if (((size_t)(w*h) <= sizeof(alpha)) && ((size_t)(w*h) > 6))
|
||||
{
|
||||
for (i = 0; i < (w*h); ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user