All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org
Subject: [bug report] ALSA: x86: Flatten two abstraction layers
Date: Tue, 7 Feb 2017 13:42:03 +0300	[thread overview]
Message-ID: <20170207104203.GA14088@mwanda> (raw)

Hello Takashi Iwai,

The patch da8648097497: "ALSA: x86: Flatten two abstraction layers"
from Jan 31, 2017, leads to the following static checker warning:

	sound/x86/intel_hdmi_audio.c:1702 hdmi_lpe_audio_probe()
	error: strcpy() '"IntelHdmiLpeAudio"' too large for 'card->driver' (18 vs 16)

sound/x86/intel_hdmi_audio.c
  1695          ctx = card->private_data;
  1696          spin_lock_init(&ctx->had_spinlock);
  1697          mutex_init(&ctx->mutex);
  1698          ctx->connected = false;
  1699          ctx->dev = &pdev->dev;
  1700          ctx->card = card;
  1701          ctx->aes_bits = SNDRV_PCM_DEFAULT_CON_SPDIF;
  1702          strcpy(card->driver, INTEL_HAD);
                                     ^^^^^^^^^
Too long.  We're corrupting memory.  The old code was equally bad, but
the renaming the function made it show up as a new warning...

  1703          strcpy(card->shortname, INTEL_HAD);
  1704  

regards,
dan carpenter

             reply	other threads:[~2017-02-07 10:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 10:42 Dan Carpenter [this message]
2017-02-07 11:22 ` [bug report] ALSA: x86: Flatten two abstraction layers Takashi Iwai
2017-02-07 11:32   ` Takashi Iwai

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=20170207104203.GA14088@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.