* [patch] ALSA: oss: underflow in snd_mixer_oss_proc_write()
@ 2015-10-15 7:01 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2015-10-15 7:01 UTC (permalink / raw)
To: Jaroslav Kysela
Cc: Takashi Iwai, Jie Yang, Mark Brown, alsa-devel, kernel-janitors
We cap the upper bound of "idx" but not the negative side. Let's make
it unsigned to fix this.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index a99f720..7a8c79d 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -1177,7 +1177,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
struct snd_mixer_oss *mixer = entry->private_data;
char line[128], str[32], idxstr[16];
const char *cptr;
- int ch, idx;
+ unsigned int idx;
+ int ch;
struct snd_mixer_oss_assign_table *tbl;
struct slot *slot;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch] ALSA: oss: underflow in snd_mixer_oss_proc_write()
@ 2015-10-15 7:01 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2015-10-15 7:01 UTC (permalink / raw)
To: Jaroslav Kysela
Cc: Takashi Iwai, Jie Yang, Mark Brown, alsa-devel, kernel-janitors
We cap the upper bound of "idx" but not the negative side. Let's make
it unsigned to fix this.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index a99f720..7a8c79d 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -1177,7 +1177,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
struct snd_mixer_oss *mixer = entry->private_data;
char line[128], str[32], idxstr[16];
const char *cptr;
- int ch, idx;
+ unsigned int idx;
+ int ch;
struct snd_mixer_oss_assign_table *tbl;
struct slot *slot;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] ALSA: oss: underflow in snd_mixer_oss_proc_write()
2015-10-15 7:01 ` Dan Carpenter
@ 2015-10-15 8:02 ` Takashi Iwai
-1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2015-10-15 8:02 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jaroslav Kysela, alsa-devel, Jie Yang, Mark Brown,
kernel-janitors
On Thu, 15 Oct 2015 09:01:42 +0200,
Dan Carpenter wrote:
>
> We cap the upper bound of "idx" but not the negative side. Let's make
> it unsigned to fix this.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks.
Takashi
>
> diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
> index a99f720..7a8c79d 100644
> --- a/sound/core/oss/mixer_oss.c
> +++ b/sound/core/oss/mixer_oss.c
> @@ -1177,7 +1177,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
> struct snd_mixer_oss *mixer = entry->private_data;
> char line[128], str[32], idxstr[16];
> const char *cptr;
> - int ch, idx;
> + unsigned int idx;
> + int ch;
> struct snd_mixer_oss_assign_table *tbl;
> struct slot *slot;
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] ALSA: oss: underflow in snd_mixer_oss_proc_write()
@ 2015-10-15 8:02 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2015-10-15 8:02 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jaroslav Kysela, alsa-devel, Jie Yang, Mark Brown,
kernel-janitors
On Thu, 15 Oct 2015 09:01:42 +0200,
Dan Carpenter wrote:
>
> We cap the upper bound of "idx" but not the negative side. Let's make
> it unsigned to fix this.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks.
Takashi
>
> diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
> index a99f720..7a8c79d 100644
> --- a/sound/core/oss/mixer_oss.c
> +++ b/sound/core/oss/mixer_oss.c
> @@ -1177,7 +1177,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
> struct snd_mixer_oss *mixer = entry->private_data;
> char line[128], str[32], idxstr[16];
> const char *cptr;
> - int ch, idx;
> + unsigned int idx;
> + int ch;
> struct snd_mixer_oss_assign_table *tbl;
> struct slot *slot;
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-15 8:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 7:01 [patch] ALSA: oss: underflow in snd_mixer_oss_proc_write() Dan Carpenter
2015-10-15 7:01 ` Dan Carpenter
2015-10-15 8:02 ` Takashi Iwai
2015-10-15 8:02 ` Takashi Iwai
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.