From: Vitaly Wool <vital@embeddedalley.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: video4linux-list@redhat.com
Subject: Re: [patch] tvaudio: remove bogus check
Date: Tue, 03 Mar 2009 16:25:19 +0300 [thread overview]
Message-ID: <49AD2FBF.4000009@embeddedalley.com> (raw)
In-Reply-To: <20090302164714.28d0e39f@pedra.chehab.org>
Hello Mauro,
Mauro Carvalho Chehab wrote:
> This patch is wrong, since it will allow the access of an inexistent position at the shadow array:
>
> chip->shadow.bytes[subaddr+1] = val;
>
> The proper fix is to increase the size of the shadow.bytes array to properly
> handle the subaddr = 0xff. Something like:
>
> -#define MAXREGS 64
> +#define MAXREGS 256
>
> Except for allocating a few more bytes, such patch won't have any other drawback.
agreed. Here's the update:
tvaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Vitaly Wool <vital@embeddedalley.com>
Index: linux-next/drivers/media/video/tvaudio.c
===================================================================
--- linux-next.orig/drivers/media/video/tvaudio.c 2009-03-02 17:50:40.000000000 +0300
+++ linux-next/drivers/media/video/tvaudio.c 2009-03-03 10:35:10.000000000 +0300
@@ -54,7 +54,7 @@
/* ---------------------------------------------------------------------- */
/* our structs */
-#define MAXREGS 64
+#define MAXREGS 256
struct CHIPSTATE;
typedef int (*getvalue)(int);
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
prev parent reply other threads:[~2009-03-03 13:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 15:12 [patch] tvaudio: remove bogus check Vitaly Wool
2009-03-02 16:02 ` Alexey Klimov
2009-03-02 19:47 ` Mauro Carvalho Chehab
2009-03-03 13:25 ` Vitaly Wool [this message]
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=49AD2FBF.4000009@embeddedalley.com \
--to=vital@embeddedalley.com \
--cc=mchehab@infradead.org \
--cc=video4linux-list@redhat.com \
/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.