You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And I had found that was my fault. I got a negative number from std::ifstream::tellg then use this number as bufferSize to create a buffer storing the JSON string.
File exists but somewhere code may not correct.
So the research result is that json::parse a dirty buffer char[1024] includes some bytes like <0x09><0x01> would crash.
And I close this issue since I fix some my issues of the file reading and buffer caching.
Description
Example data (dump from LLDB):
Reproduction steps
Just parse the JSON then crashing
Crash position:
![截屏2024-05-29 17 55 32](https://private-user-images.githubusercontent.com/18480287/334752004-92a112d4-4590-4c06-9aa9-b2781b8c2acd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3MDA4NTksIm5iZiI6MTcxOTcwMDU1OSwicGF0aCI6Ii8xODQ4MDI4Ny8zMzQ3NTIwMDQtOTJhMTEyZDQtNDU5MC00YzA2LTlhYTktYjI3ODFiOGMyYWNkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDIyMzU1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY1MzM1N2MwZjVkNTcxZDlmMjMxNDc0OTYwOGQ3MzJhNzM2YWRiNzJkMDgyMzQ4YjcxODg1OGMzYjg0NGJkYzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oLXKkLlEY9ko36kD4JoiVl7y1dltsl56hAALcKvHeUY)
Expected vs. actual results
no crashing
Minimal code example
Error messages
Critical error detected c0000374
Compiler and operating system
MSVC 2019
Library version
main\origin
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: