Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: oe-kbuild-all@lists.linux.dev, alsa-devel@alsa-project.org
Subject: [tiwai-sound:for-next 6/10] sound/core/ump.c:1259:69: warning: '%s' directive output may be truncated writing up to 11 bytes into a region of size between 4 and 22
Date: Sat, 30 Nov 2024 01:37:30 +0800	[thread overview]
Message-ID: <202411300103.FrGuTAYp-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
head:   9b5f8ee43e48c25fbe1a10163ec04343d750acd0
commit: e29e504e7890b9ee438ca6370d0180d607c473f9 [6/10] ALSA: ump: Indicate the inactive group in legacy substream names
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20241130/202411300103.FrGuTAYp-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241130/202411300103.FrGuTAYp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411300103.FrGuTAYp-lkp@intel.com/

All warnings (new ones prefixed by >>):

   sound/core/ump.c: In function 'fill_substream_names':
>> sound/core/ump.c:1259:69: warning: '%s' directive output may be truncated writing up to 11 bytes into a region of size between 4 and 22 [-Wformat-truncation=]
    1259 |                 snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
         |                                                                     ^~
   sound/core/ump.c:1259:17: note: 'snprintf' output between 11 and 40 bytes into a destination of size 32
    1259 |                 snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1260 |                          idx + 1, name,
         |                          ~~~~~~~~~~~~~~
    1261 |                          ump->groups[idx].active ? "" : " [Inactive]");
         |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +1259 sound/core/ump.c

  1246	
  1247	static void fill_substream_names(struct snd_ump_endpoint *ump,
  1248					 struct snd_rawmidi *rmidi, int dir)
  1249	{
  1250		struct snd_rawmidi_substream *s;
  1251		const char *name;
  1252		int idx;
  1253	
  1254		list_for_each_entry(s, &rmidi->streams[dir].substreams, list) {
  1255			idx = ump->legacy_mapping[s->number];
  1256			name = ump->groups[idx].name;
  1257			if (!*name)
  1258				name = ump->info.name;
> 1259			snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
  1260				 idx + 1, name,
  1261				 ump->groups[idx].active ? "" : " [Inactive]");
  1262		}
  1263	}
  1264	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-11-29 17:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202411300103.FrGuTAYp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox