Compartilhar via


PREfast Warning 202 (Windows CE 5.0)

Send Feedback

202 - Buffer overrun for stack buffer <variable> in call to <function>.
Additional Information: Length exceeds buffer size.This warning indicates that a parameter pointing to a stack buffer of known size is being passed into a function that copies more bytes into it than that size. This situation will cause a buffer overrun.

This defect is likely to result in an exploitable security hole or a program crash.

A common cause for the defect is cut-and-paste errors.

If PREfast can determine that the mismatch between the length and size is caused by confusion between character and byte count, it reports warning 57.

Example

Defective Source

char charArray[5];
int intArray[5];
memset ((void *)charArray, 0, sizeof intArray);

Corrected Source

char charArray[5];
int intArray[5];

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.