mbox series

[v2,net,0/2] net: Fix error/warning by -fstrict-flex-arrays=3

Message ID 20230720004410.87588-1-kuniyu@amazon.com (mailing list archive)
Headers show
Series net: Fix error/warning by -fstrict-flex-arrays=3 | expand

Message

Kuniyuki Iwashima July 20, 2023, 12:44 a.m. UTC
df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3") started applying
strict rules for standard string functions (strlen(), memcpy(), etc.) if
CONFIG_FORTIFY_SOURCE=y.

This series fixes two false positives caught by syzkaller.


Changes:
  v2:
    * Patch 2: Fix offset calc.

  v1: https://lore.kernel.org/netdev/20230719185322.44255-1-kuniyu@amazon.com/


Kuniyuki Iwashima (2):
  af_unix: Fix fortify_panic() in unix_bind_bsd().
  af_packet: Fix warning of fortified memcpy() in packet_getname().

 net/packet/af_packet.c |  7 ++++++-
 net/unix/af_unix.c     | 16 +++++++++++++---
 2 files changed, 19 insertions(+), 4 deletions(-)