Skip to content
Commit beb78cd1 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Paolo Abeni
Browse files

selftests/tcp_ao: Fix fscanf() call for format-security



On my new laptop with packages from nixos-unstable, gcc 12.3.0 produces:
> lib/proc.c: In function ‘netstat_read_type’:
> lib/proc.c:89:9: error: format not a string literal and no format arguments [-Werror=format-security]
>    89 |         if (fscanf(fnetstat, type->header_name) == EOF)
>       |         ^~
> cc1: some warnings being treated as errors

Here the selftests lib parses header name, while expectes non-space word
ending with a column.

Fixes: cfbab37b ("selftests/net: Add TCP-AO library")
Signed-off-by: default avatarDmitry Safonov <0x7f454c46@gmail.com>
Reported-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent b089b3be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment