Fix possible sscanf buffer overflow

pull/597/head
Rikus Wessels 2025-08-09 01:04:20 +02:00
parent 6b46063eee
commit 97edb33210
1 changed files with 1 additions and 1 deletions

View File

@ -541,7 +541,7 @@ int main(int argc, char **argv)
break; break;
} }
if (sscanf(buf, "(%llu.%llu) %s %s", &sec, &usec, device, afrbuf) != 4) { if (sscanf(buf, "(%llu.%llu) %21s %6299s", &sec, &usec, device, afrbuf) != 4) {
fprintf(stderr, "incorrect line format in logfile\n"); fprintf(stderr, "incorrect line format in logfile\n");
return 1; return 1;
} }