glibc/sunrpc
Adhemerval Zanella Netto 6128e82ebe sunrpc: Suppress GCC -Os warning on user2netname
GCC with -Os warns that sprint might overflow:

  netname.c: In function ‘user2netname’:
  netname.c:51:28: error: ‘%s’ directive writing up to 255 bytes into a
  region of size between 239 and 249 [-Werror=format-overflow=]
     51 |   sprintf (netname, "%s.%d@%s", OPSYS, uid, dfltdom);
        |                            ^~               ~~~~~~~
  netname.c:51:3: note: ‘sprintf’ output between 8 and 273 bytes into a
  destination of size 256
     51 |   sprintf (netname, "%s.%d@%s", OPSYS, uid, dfltdom);
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

However the code does test prior the sprintf call that dfltdom plus
the required extra space for OPSYS, uid, and extra character will not
overflow and return 0 instead.

Checked on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2022-10-05 18:04:13 -03:00
..
rpc Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
auth_des.c
auth_none.c
auth_unix.c
authdes_prot.c
authuxprot.c
clnt_gen.c CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542) 2022-01-17 10:22:00 +01:00
clnt_perr.c sunrpc: Turn clnt_sperrno into a libc_hidden_nolink_sunrpc symbol 2020-07-07 20:19:57 +02:00
clnt_raw.c
clnt_simp.c
clnt_tcp.c
clnt_udp.c
clnt_unix.c
create_xid.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
des_crypt.c
des_impl.c
des_soft.c
get_myaddr.c
getrpcport.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
key_call.c Force building with -fno-common 2021-07-09 20:09:14 +02:00
key_prot.c
Makefile CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) 2022-01-17 10:47:58 +01:00
netname.c sunrpc: Suppress GCC -Os warning on user2netname 2022-10-05 18:04:13 -03:00
openchild.c
pm_getmaps.c
pm_getport.c
pmap_clnt.c
pmap_prot2.c
pmap_prot.c
pmap_rmt.c
publickey.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
rpc_cmsg.c
rpc_common.c Force building with -fno-common 2021-07-09 20:09:14 +02:00
rpc_dtable.c
rpc_gethostbyname.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
rpc_prot.c
rpc_thread.c
rtime.c
svc_auth.c
svc_authux.c
svc_raw.c
svc_run.c
svc_simple.c
svc_tcp.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
svc_udp.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
svc_unix.c CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) 2022-01-17 10:47:58 +01:00
svc.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
svcauth_des.c Force building with -fno-common 2021-07-09 20:09:14 +02:00
test-rpcent.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
thrsvc.c
tst-bug22542.c sunrpc: Test case for clnt_create "unix" buffer overflow (bug 22542) 2022-01-17 10:22:07 +01:00
tst-bug28768.c CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) 2022-01-17 10:47:58 +01:00
tst-getmyaddr.c
tst-svc_register.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-udp-error.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-udp-garbage.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-udp-nonblocking.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-udp-timeout.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-xdrmem2.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
tst-xdrmem.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
Versions
xcrypt.c
xdr_array.c
xdr_float.c
xdr_intXX_t.c Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
xdr_mem.c
xdr_rec.c
xdr_ref.c
xdr_sizeof.c
xdr_stdio.c
xdr.c sunrpc: Fix typo in xdr_string comment 2021-02-08 13:55:03 +01:00