mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
Check NULL pointer while opening filees to prevent Notepad++ from crash
Fix #14131, close #14094
This commit is contained in:
parent
670e2f098d
commit
cb1f2d1479
@ -59,6 +59,8 @@ std::string getFileContent(const TCHAR *file2read)
|
||||
char data[blockSize];
|
||||
std::string wholeFileContent = "";
|
||||
FILE *fp = _wfopen(file2read, TEXT("rb"));
|
||||
if (!fp)
|
||||
return "";
|
||||
|
||||
size_t lenFile = 0;
|
||||
do
|
||||
|
Loading…
x
Reference in New Issue
Block a user