Lines 30-35
Link Here
|
30 |
#include <unistd.h> |
30 |
#include <unistd.h> |
31 |
#endif |
31 |
#endif |
32 |
|
32 |
|
|
|
33 |
#include <stdint.h> |
34 |
|
33 |
#include "wmfdefs.h" |
35 |
#include "wmfdefs.h" |
34 |
#include "metadefs.h" |
36 |
#include "metadefs.h" |
35 |
|
37 |
|
Lines 133-139
Link Here
|
133 |
} |
135 |
} |
134 |
|
136 |
|
135 |
/* P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char)); |
137 |
/* P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char)); |
136 |
*/ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char)); |
138 |
P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char)); */ |
|
|
139 |
|
140 |
if(MAX_REC_SIZE(API) > UINT32_MAX/2) { |
141 |
API->err = wmf_E_InsMem; |
142 |
WMF_DEBUG(API,"bailing..."); |
143 |
return (API->err); |
144 |
} |
145 |
|
146 |
P->Parameters = (unsigned char *) wmf_malloc(API,(MAX_REC_SIZE(API)) * 2 * sizeof(unsigned char)); |
137 |
|
147 |
|
138 |
if (ERR (API)) |
148 |
if (ERR (API)) |
139 |
{ WMF_DEBUG (API,"bailing..."); |
149 |
{ WMF_DEBUG (API,"bailing..."); |