Skip to content

Conversation

@sercanarga
Copy link

found and fixed a few critical bugs while reviewing the code:

memory leak in search
the case-insensitive search was corrupting the original text buffer by calling CharLowerBuffW directly on it. now we create a separate copy for comparison, keeping the original safe.

overflow protection in replace all
when replacing text in large files, the buffer size calculation could overflow. added a check to prevent crashes when the result would be too large.

better default filename
changed the save dialog default from *.txt (which is a wildcard) to Untitled.txt -which makes more sense-.

tested all fixes with msvc, no warnings or issues found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants