Error "the system detected an overrun of a stack-based buffer in this application "

Lorenzo Zambelli 180 Reputation points
2025-05-07T09:37:05.2966667+00:00

Hello, since some customers of ours got the latest upgrades Windows 11 upgrades at the end of April, they're getting the error in the title when opening or saving projects.

Our software is written in Visual C++, we are shipping with the latest VCRedist available, and we already tried reinstalling it, but nothing changed.

The issue disappeared eventually when the last Windows 11 upgrade was removed, but it's hard to tell when it will be restored from Windows Update, also we don't consider that procedure correct for our customers.

Debugging our software, we found the crash happens when calling the CFileDialog init dialog, so it's something in MFC classes that is not handled correctly.

We already tried all the procedures you may find, like DISM /RestoreHealth and sfc /scannow, but nothing worked.

Any help would be really appreciated.

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lorenzo Zambelli 180 Reputation points
    2025-05-19T14:43:08.16+00:00

    We found a fix: we removed in the initialization of our software the call to CoInitializeEx and CoInitializeSecurity.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.