We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果读取slin.log.0, erpc.log.0 程序会崩溃 ,读取文件名为module.log.0 程序正常
调试后发现内存分配长度没有考虑\0, 由于malloc分配以字节对齐方式分配,当文件名不是对齐字节长度的整数倍,malloc会多分配一些字节以保证内存对齐,某些文件名长度正好是整数倍时,出现内存越界,导致程序崩溃
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
欢迎提交 PR 哈
No branches or pull requests
如果读取slin.log.0, erpc.log.0 程序会崩溃 ,读取文件名为module.log.0 程序正常
调试后发现内存分配长度没有考虑\0, 由于malloc分配以字节对齐方式分配,当文件名不是对齐字节长度的整数倍,malloc会多分配一些字节以保证内存对齐,某些文件名长度正好是整数倍时,出现内存越界,导致程序崩溃
The text was updated successfully, but these errors were encountered: