Browse code

(uxnasm)Allow more space for symbols filename, and check for length

neauoire authored on 10/12/2022 19:07:45
Showing 1 changed files
... ...
@@ -451,8 +451,11 @@ review(char *filename)
451 451
 static void
452 452
 writesym(char *filename)
453 453
 {
454
-	char symdst[0x40];
455
-	FILE *fp = fopen(scat(scpy(filename, symdst, slen(filename) + 1), ".sym"), "w");
454
+	char symdst[0x60];
455
+	FILE *fp
456
+	if(slen(filename) > 0x60 - 5)
457
+		return;
458
+	fp = fopen(scat(scpy(filename, symdst, slen(filename) + 1), ".sym"), "w");
456 459
 	int i;
457 460
 	if(fp != NULL) {
458 461
 		for(i = 0; i < p.llen; i++) {