提交 51ec138c 编写于 作者: A Al Viro 提交者: Linus Torvalds

ieee1394: forgotten dereference...

Going through the string and waiting for _pointer_ to become '\0'
is not what the authors meant...
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Acked-by: NBen Collins <ben.collins@ubuntu.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0e81c666
......@@ -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'; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册