* [PATCH] ieee1394: forgotten dereference...
@ 2007-07-15 19:59 Al Viro
2007-07-15 21:05 ` Ben Collins
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2007-07-15 19:59 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, ben.collins
Going through the string and waiting for _pointer_ to become '\0'
is not what the authors meant...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
drivers/ieee1394/nodemgr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index c4d3d41..51a1206 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -283,7 +283,7 @@ static ssize_t fw_show_##class##_##td_kv (struct device *dev, struct device_attr
memcpy(buf, \
CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA(class->td_kv), \
len); \
- while ((buf + len - 1) == '\0') \
+ while (buf[len - 1] == '\0') \
len--; \
buf[len++] = '\n'; \
buf[len] = '\0'; \
--
1.5.3.GIT
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ieee1394: forgotten dereference...
2007-07-15 19:59 [PATCH] ieee1394: forgotten dereference Al Viro
@ 2007-07-15 21:05 ` Ben Collins
0 siblings, 0 replies; 2+ messages in thread
From: Ben Collins @ 2007-07-15 21:05 UTC (permalink / raw)
To: Al Viro; +Cc: torvalds, linux-kernel
On Sun, 2007-07-15 at 20:59 +0100, Al Viro wrote:
> Going through the string and waiting for _pointer_ to become '\0'
> is not what the authors meant...
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> drivers/ieee1394/nodemgr.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
> index c4d3d41..51a1206 100644
> --- a/drivers/ieee1394/nodemgr.c
> +++ b/drivers/ieee1394/nodemgr.c
> @@ -283,7 +283,7 @@ static ssize_t fw_show_##class##_##td_kv (struct device *dev, struct device_attr
> memcpy(buf, \
> CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA(class->td_kv), \
> len); \
> - while ((buf + len - 1) == '\0') \
> + while (buf[len - 1] == '\0') \
> len--; \
> buf[len++] = '\n'; \
> buf[len] = '\0'; \
ACK
Definitely looks right with your patch. Thanks.
--
Ubuntu : http://www.ubuntu.com/
Linux1394: http://wiki.linux1394.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-15 21:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-15 19:59 [PATCH] ieee1394: forgotten dereference Al Viro
2007-07-15 21:05 ` Ben Collins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox