commit 730440b
Devine Lu Linvega
·
2023-01-01 18:49:05 +0000 UTC
parent 714bbcf
Do not crash on symbol gen for long file names
1 files changed,
+5,
-2
+5,
-2
1@@ -451,8 +451,11 @@ review(char *filename)
2 static void
3 writesym(char *filename)
4 {
5- char symdst[0x40];
6- FILE *fp = fopen(scat(scpy(filename, symdst, slen(filename) + 1), ".sym"), "w");
7+ char symdst[0x60];
8+ FILE *fp;
9+ if(slen(filename) > 0x60 - 5)
10+ return;
11+ fp = fopen(scat(scpy(filename, symdst, slen(filename) + 1), ".sym"), "w");
12 int i;
13 if(fp != NULL) {
14 for(i = 0; i < p.llen; i++) {