Commit ca2f40bd authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Catch maximum number of times and return out of memory error.

parent 638ae43c
......@@ -19,6 +19,7 @@
#include <string.h>
#include <stdlib.h> /* atoi */
#include <ctype.h>
#include <limits.h>
#include "commctrl.h"
#include "objbase.h"
......@@ -109,6 +110,9 @@ DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc, IStream *pStream, LPARAM lPar
errCode = E_FAIL;
}
if (streamData.dwItems > (UINT_MAX / 2 / sizeof(VOID*))) /* 536870911 */
return E_OUTOFMEMORY;
/* create the dpa */
hDpa = DPA_Create (streamData.dwItems);
if (!hDpa)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment