linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check
@ 2003-01-15  3:13 ryan
  2003-01-15  3:30 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: ryan @ 2003-01-15  3:13 UTC (permalink / raw)
  To: linux-kernel

diff -urN a/sound/oss/sb_mixer.c b/sound/oss/sb_mixer.c
--- a/sound/oss/sb_mixer.c      Fri Jan 10 15:11:27 2003
+++ b/sound/oss/sb_mixer.c      Tue Jan 14 22:06:20 2003
@@ -333,6 +333,9 @@
                         break;

                 default:
+                       /* bounds check */
+                       if (dev >= sizeof(smw_mix_regs))
+                               return -EINVAL;
                         reg = smw_mix_regs[dev];
                         if (reg == 0)
                                 return -EINVAL;


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check
  2003-01-15  3:13 [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check ryan
@ 2003-01-15  3:30 ` Andrew Morton
  2003-01-15  4:21   ` ryan
  2003-01-15  4:37   ` ryan
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Morton @ 2003-01-15  3:30 UTC (permalink / raw)
  To: ryan, linux-kernel

On Tue January 14 2003 19:13, ryan wrote:
>
> diff -urN a/sound/oss/sb_mixer.c b/sound/oss/sb_mixer.c
> --- a/sound/oss/sb_mixer.c      Fri Jan 10 15:11:27 2003
> +++ b/sound/oss/sb_mixer.c      Tue Jan 14 22:06:20 2003
> @@ -333,6 +333,9 @@
>                          break;
> 
>                  default:
> +                       /* bounds check */
> +                       if (dev >= sizeof(smw_mix_regs))
> +                               return -EINVAL;
>                          reg = smw_mix_regs[dev];
>                          if (reg == 0)
>                                  return -EINVAL;

Yup.

It would be better to do:

	if (dev < 0 || dev >= ARRAY_SIZE(smw_mix_regs))




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check
  2003-01-15  3:30 ` Andrew Morton
@ 2003-01-15  4:21   ` ryan
  2003-01-15  4:36     ` Andrew Morton
  2003-01-15  4:37   ` ryan
  1 sibling, 1 reply; 7+ messages in thread
From: ryan @ 2003-01-15  4:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

> Yup.
> 
> It would be better to do:
> 
> 	if (dev < 0 || dev >= ARRAY_SIZE(smw_mix_regs))

yup, much better. i did a little housecleaning on the whole file, as 
well as 2 more bounds checks in appropriate places.

i'm sorry to ask, but i'm new -- i've got a ~500 line patch, and my 
email client is wrapping at 80 chars (unfortunately some lines run over 
80 chars), is sending an attachment in ascii format ok? i've seen some 
patches sent as attachments, not sure.

waiting for a yes/no response, please cc me


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check
  2003-01-15  4:21   ` ryan
@ 2003-01-15  4:36     ` Andrew Morton
  2003-01-15  5:34       ` (OT) " Bruce Harada
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2003-01-15  4:36 UTC (permalink / raw)
  To: ryan; +Cc: linux-kernel

ryan wrote:
>> Yup.
>>
>> It would be better to do:
>>
>>     if (dev < 0 || dev >= ARRAY_SIZE(smw_mix_regs))
> 
> 
> yup, much better. i did a little housecleaning on the whole file, as 
> well as 2 more bounds checks in appropriate places.
> 
> i'm sorry to ask, but i'm new -- i've got a ~500 line patch, and my 
> email client is wrapping at 80 chars (unfortunately some lines run over 
> 80 chars), is sending an attachment in ascii format ok? i've seen some 
> patches sent as attachments, not sure.
> 

Oh let me rant. You're using mozilla.  I just raised a bug against its cute habit of
mangling outgoing text.  I've just spent four days trying to find a workable Linux
email client (sophisticated UI, sophisticated IMAP support, sophisticated searching,
doesn't mangle incoming or outgoing messages) and have failed.  Netscape 4.x is
still the closest.

kmail is good, but its threading view is hopeless

evolution merrily mangles stuff and is buggy as a bunch of bananas.

Mozilla likes to go for multi-minute CPU burns if you try to handle a large amount
of data.  And it mangles outgoing patches.

Of the text-based MUA's pine is the only one which seems to have respectable IMAP
support, but the interface is klunky.

Sigh.  Where were we?  Oh yes.   Inline text is best, attachments are fine.
text/plain if poss.

<send, mangle>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check
  2003-01-15  3:30 ` Andrew Morton
  2003-01-15  4:21   ` ryan
@ 2003-01-15  4:37   ` ryan
  1 sibling, 0 replies; 7+ messages in thread
From: ryan @ 2003-01-15  4:37 UTC (permalink / raw)
  To: linux-kernel

Andrew Morton wrote:
--snip--
> It would be better to do:
> 
> 	if (dev < 0 || dev >= ARRAY_SIZE(smw_mix_regs))
> 

some bounds checking and general housecleaning

http://www.0x80.org/patches/2.5.56/sb_mixer.diff


^ permalink raw reply	[flat|nested] 7+ messages in thread

* (OT) Re: [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check
  2003-01-15  4:36     ` Andrew Morton
@ 2003-01-15  5:34       ` Bruce Harada
  2003-01-15  6:44         ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Harada @ 2003-01-15  5:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Tue, 14 Jan 2003 20:36:35 -0800
Andrew Morton <akpm@digeo.com> wrote:

> Oh let me rant. You're using mozilla.  I just raised a bug against its cute
> habit of mangling outgoing text.  I've just spent four days trying to find a
> workable Linux email client (sophisticated UI, sophisticated IMAP support,
> sophisticated searching, doesn't mangle incoming or outgoing messages) and
> have failed.  Netscape 4.x is still the closest.

Have you tried Sylpheed? (http://sylpheed.good-day.net/index.cgi.en)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (OT) Re: [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check
  2003-01-15  5:34       ` (OT) " Bruce Harada
@ 2003-01-15  6:44         ` Andrew Morton
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2003-01-15  6:44 UTC (permalink / raw)
  To: Bruce Harada; +Cc: linux-kernel

On Wed, 15 Jan 2003 14:34:36 +0900
Bruce Harada <bharada@coral.ocn.ne.jp> wrote:

> On Tue, 14 Jan 2003 20:36:35 -0800
> Andrew Morton <akpm@digeo.com> wrote:
> 
> > Oh let me rant. You're using mozilla.  I just raised a bug against its cute
> > habit of mangling outgoing text.  I've just spent four days trying to find a
> > workable Linux email client (sophisticated UI, sophisticated IMAP support,
> > sophisticated searching, doesn't mangle incoming or outgoing messages) and
> > have failed.  Netscape 4.x is still the closest.
> 
> Have you tried Sylpheed? (http://sylpheed.good-day.net/index.cgi.en)

Supports external editor, fast, ability to import a file into message body,
decent IMAP support, patches actually still apply after a round trip.

A few glitches, but looking good, thanks!



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-01-15  6:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-15  3:13 [PATCH] 2.5.56 sound/oss/sb_mixer.c bounds check ryan
2003-01-15  3:30 ` Andrew Morton
2003-01-15  4:21   ` ryan
2003-01-15  4:36     ` Andrew Morton
2003-01-15  5:34       ` (OT) " Bruce Harada
2003-01-15  6:44         ` Andrew Morton
2003-01-15  4:37   ` ryan

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).