* [PATCH] Trivial fix to phram.c
@ 2004-08-04 19:41 Ari Rahikkala
2004-08-05 12:52 ` Jörn Engel
0 siblings, 1 reply; 7+ messages in thread
From: Ari Rahikkala @ 2004-08-04 19:41 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
I'm not sure if gmail likes to mangle stuff a lot, so I'll include
this patch both inline and as an attachment.
--- linux-2.6.7/drivers/mtd/devices/phram.c 2004-08-04
22:29:04.850552576 +0300
+++ linux-2.6.7/drivers/mtd/devices/phram.c.argument_fix
2004-08-04 22:25:04.557082736 +0300
@@ -231,14 +231,15 @@
static int phram_setup(const char *val, struct kernel_param *kp)
{
- char buf[64+12+12], *str = buf;
+ const int buflen = 88;
+ char buf[buflen], *str = buf;
char *token[3];
char *name;
uint32_t start;
uint32_t len;
int i, ret;
- if (strnlen(val, sizeof(str)) >= sizeof(str))
+ if (strnlen(val, buflen) >= buflen)
parse_err("parameter too long\n");
strcpy(str, val);
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: argumentfix.diff --]
[-- Type: text/x-patch; name="argumentfix.diff", Size: 605 bytes --]
--- linux-2.6.7/drivers/mtd/devices/phram.c 2004-08-04 22:29:04.850552576 +0300
+++ linux-2.6.7/drivers/mtd/devices/phram.c.argument_fix 2004-08-04 22:25:04.557082736 +0300
@@ -231,14 +231,15 @@
static int phram_setup(const char *val, struct kernel_param *kp)
{
- char buf[64+12+12], *str = buf;
+ const int buflen = 88;
+ char buf[buflen], *str = buf;
char *token[3];
char *name;
uint32_t start;
uint32_t len;
int i, ret;
- if (strnlen(val, sizeof(str)) >= sizeof(str))
+ if (strnlen(val, buflen) >= buflen)
parse_err("parameter too long\n");
strcpy(str, val);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Trivial fix to phram.c
2004-08-04 19:41 [PATCH] Trivial fix to phram.c Ari Rahikkala
@ 2004-08-05 12:52 ` Jörn Engel
2004-08-05 13:05 ` David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Jörn Engel @ 2004-08-05 12:52 UTC (permalink / raw)
To: Ari Rahikkala; +Cc: linux-mtd
On Wed, 4 August 2004 22:41:32 +0300, Ari Rahikkala wrote:
>
> I'm not sure if gmail likes to mangle stuff a lot, so I'll include
> this patch both inline and as an attachment.
Patch is fine. David, does cvs via ipv4 work again?
> --- linux-2.6.7/drivers/mtd/devices/phram.c 2004-08-04
> 22:29:04.850552576 +0300
> +++ linux-2.6.7/drivers/mtd/devices/phram.c.argument_fix
> 2004-08-04 22:25:04.557082736 +0300
> @@ -231,14 +231,15 @@
>
> static int phram_setup(const char *val, struct kernel_param *kp)
> {
> - char buf[64+12+12], *str = buf;
> + const int buflen = 88;
> + char buf[buflen], *str = buf;
> char *token[3];
> char *name;
> uint32_t start;
> uint32_t len;
> int i, ret;
>
> - if (strnlen(val, sizeof(str)) >= sizeof(str))
> + if (strnlen(val, buflen) >= buflen)
> parse_err("parameter too long\n");
>
> strcpy(str, val);
Jörn
--
My second remark is that our intellectual powers are rather geared to
master static relations and that our powers to visualize processes
evolving in time are relatively poorly developed.
-- Edsger W. Dijkstra
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Trivial fix to phram.c
2004-08-05 12:52 ` Jörn Engel
@ 2004-08-05 13:05 ` David Woodhouse
2004-08-05 14:14 ` Jörn Engel
0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2004-08-05 13:05 UTC (permalink / raw)
To: Jörn Engel; +Cc: linux-mtd
On Thu, 2004-08-05 at 14:52 +0200, Jörn Engel wrote:
> On Wed, 4 August 2004 22:41:32 +0300, Ari Rahikkala wrote:
> >
> > I'm not sure if gmail likes to mangle stuff a lot, so I'll include
> > this patch both inline and as an attachment.
>
> Patch is fine. David, does cvs via ipv4 work again?
Not yet. Does anyone still not have IPv6? :)
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Trivial fix to phram.c
2004-08-05 13:05 ` David Woodhouse
@ 2004-08-05 14:14 ` Jörn Engel
2004-08-05 14:25 ` David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Jörn Engel @ 2004-08-05 14:14 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
On Thu, 5 August 2004 14:05:41 +0100, David Woodhouse wrote:
>
> Not yet. Does anyone still not have IPv6? :)
Does it involve work to set things up? ;)
Jörn
--
The wise man seeks everything in himself; the ignorant man tries to get
everything from somebody else.
-- unknown
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Trivial fix to phram.c
2004-08-05 14:14 ` Jörn Engel
@ 2004-08-05 14:25 ` David Woodhouse
2004-08-05 14:30 ` Jörn Engel
0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2004-08-05 14:25 UTC (permalink / raw)
To: Jörn Engel; +Cc: linux-mtd
On Thu, 2004-08-05 at 16:14 +0200, Jörn Engel wrote:
> On Thu, 5 August 2004 14:05:41 +0100, David Woodhouse wrote:
> >
> > Not yet. Does anyone still not have IPv6? :)
>
> Does it involve work to set things up? ;)
Yeah. Four lines added to your network config scripts.
http://www.linux-mtd.infradead.org/
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Trivial fix to phram.c
2004-08-05 14:25 ` David Woodhouse
@ 2004-08-05 14:30 ` Jörn Engel
2004-08-05 14:41 ` David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Jörn Engel @ 2004-08-05 14:30 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
On Thu, 5 August 2004 15:25:18 +0100, David Woodhouse wrote:
> On Thu, 2004-08-05 at 16:14 +0200, Jörn Engel wrote:
> >
> > Does it involve work to set things up? ;)
>
> Yeah. Four lines added to your network config scripts.
> http://www.linux-mtd.infradead.org/
o Debian
o Company firewall
o No internet at home (I'm a cheap and lazy bastard)
Fsck!
Jörn
--
The only real mistake is the one from which we learn nothing.
-- John Powell
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Trivial fix to phram.c
2004-08-05 14:30 ` Jörn Engel
@ 2004-08-05 14:41 ` David Woodhouse
0 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2004-08-05 14:41 UTC (permalink / raw)
To: Jörn Engel; +Cc: linux-mtd
On Thu, 2004-08-05 at 16:30 +0200, Jörn Engel wrote:
> On Thu, 5 August 2004 15:25:18 +0100, David Woodhouse wrote:
> > On Thu, 2004-08-05 at 16:14 +0200, Jörn Engel wrote:
> > >
> > > Does it involve work to set things up? ;)
> >
> > Yeah. Four lines added to your network config scripts.
> > http://www.linux-mtd.infradead.org/
>
> o Debian
> o Company firewall
> o No internet at home (I'm a cheap and lazy bastard)
SSH's ProxyCommand option is a wonderful thing.
Host cvs.infradead.org
ProxyCommand ssh <someipv6capablebox> exec netcat %h %p
--
dwmw2
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-08-05 14:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-04 19:41 [PATCH] Trivial fix to phram.c Ari Rahikkala
2004-08-05 12:52 ` Jörn Engel
2004-08-05 13:05 ` David Woodhouse
2004-08-05 14:14 ` Jörn Engel
2004-08-05 14:25 ` David Woodhouse
2004-08-05 14:30 ` Jörn Engel
2004-08-05 14:41 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox