Re: [PATCH] input: Fix UB during self-tests [PR119052]

2025-03-01 Thread Richard Biener
> Am 01.03.2025 um 09:59 schrieb Jakub Jelinek : > > Hi! > > As the comment in check_line says: > /* get_buffer is not null terminated, but the sscanf stops after a number. > */ > the buffer is not null terminated, there is line.length () to determine > the size of the line. But unlike wh

[PATCH] input: Fix UB during self-tests [PR119052]

2025-03-01 Thread Jakub Jelinek
Hi! As the comment in check_line says: /* get_buffer is not null terminated, but the sscanf stops after a number. */ the buffer is not null terminated, there is line.length () to determine the size of the line. But unlike what the comment says, sscanf actually still requires null terminated st