ref: dc21d6cf740840ef15946a7da129900ca219f675
parent: 0ea5ed7a4f9606f9157b2651420a20a9aad10b32
author: x <x@hilbert>
date: Sat Dec 27 02:15:12 EST 2025
Stricter test of RIDE header
--- a/ridefs.c
+++ b/ridefs.c
@@ -300,7 +300,7 @@
if((n = readn(fd, buf, 8)) < 0)
return n;
buf[9] = '\0';
- if(strcmp(&buf[4], "RIDE") != 0)
+ if(strncmp(&buf[4], "RIDE", 4) != 0)
return -1;
n = buf[0]<<24 & 0xff000000;
--
⑨