Fix possible sscanf buffer overflow

pull/600/head
Rikus Wessels 2025-08-09 01:04:20 +02:00 committed by Oliver Hartkopp
parent 987bc8aac2
commit 0094905376
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,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;
} }