]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ieee1394: forgotten dereference...
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 Jul 2007 16:01:20 +0000 (18:01 +0200)
committerAdrian Bunk <bunk@stusta.de>
Sun, 22 Jul 2007 16:01:20 +0000 (18:01 +0200)
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: Adrian Bunk <bunk@stusta.de>
drivers/ieee1394/nodemgr.c

index 082c7fd239f584a14f64604bb65fe770697eda02..8805a27b63e6c9c02029a5c30dcc8921eb669cf8 100644 (file)
@@ -240,7 +240,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';                                                \