fix(security): resolve critical buffer overflow and workflow permissions issues

This commit is contained in:
Aethersailor
2025-12-29 16:41:54 +08:00
parent 255ebffb69
commit 068595ab03
2 changed files with 4 additions and 1 deletions

View File

@@ -13,6 +13,9 @@ on:
jobs:
update-mihomo:
runs-on: ubuntu-latest
permissions:
contents: write # Required for git push
pull-requests: write # Required for potential PR creation
steps:
- name: Checkout code
uses: actions/checkout@v4

View File

@@ -33,7 +33,7 @@ void SetConsoleTitle(const std::string &title) {
#endif // _WIN32
void setcd(std::string &file) {
char szTemp[1024] = {}, filename[256] = {};
char szTemp[4096] = {}, filename[256] = {};
std::string path;
#ifdef _WIN32
char *pname = NULL;