]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ieee1394: forgotten dereference...
authorAl Viro <viro@ftp.linux.org.uk>
Sun, 15 Jul 2007 19:59:51 +0000 (20:59 +0100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 15 Jul 2007 23:40:51 +0000 (16:40 -0700)
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>
Acked-by: Ben Collins <ben.collins@ubuntu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/ieee1394/nodemgr.c

index c4d3d4131f01728725496526687de8a55906bc20..51a12062ed368726530dd60b9fbbe43469ec8f4b 100644 (file)
@@ -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';                                                \