linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fs/qnx4/dir.c:51:32: warning: ‘strnlen’ specified bound 48 exceeds source size 16 [-Wstringop-overread]
@ 2021-05-19  1:12 Ammar Faizi
  0 siblings, 0 replies; only message in thread
From: Ammar Faizi @ 2021-05-19  1:12 UTC (permalink / raw)
  To: al; +Cc: linux-kernel

Hi, Anders Larsen

I found that you're a maintainer:QNX4 FILESYSTEM. So I am reporting this to you.
GCC 11 warns ‘strnlen’ specified bound 48 exceeds source size 16.

  fs/qnx4/dir.c: In function ‘qnx4_readdir’:
  fs/qnx4/dir.c:51:32: warning: ‘strnlen’ specified bound 48 exceeds
source size 16 [-Wstringop-overread]
     51 |                         size = strnlen(de->di_fname, size);
        |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from fs/qnx4/qnx4.h:3,
                   from fs/qnx4/dir.c:16:
  ./include/uapi/linux/qnx4_fs.h:45:25: note: source object declared here
     45 |         char            di_fname[QNX4_SHORT_NAME_MAX];
        |                         ^~~~~~~~

I found this warning in commit 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/

  commit 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
  Merge: d07f6ca923ea 54a40fc3a1da
  Author: Linus Torvalds <torvalds@linux-foundation.org>
  Date:   Mon May 17 09:55:10 2021 -0700

GCC version detail:
  ammarfaizi2@integral:~/project/now/linux$ gcc --version
  gcc (Ubuntu 11.1.0-1ubuntu1~21.04) 11.1.0
  Copyright (C) 2021 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Regards,
Ammar Faizi

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-19  1:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  1:12 fs/qnx4/dir.c:51:32: warning: ‘strnlen’ specified bound 48 exceeds source size 16 [-Wstringop-overread] Ammar Faizi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).