[FIX] add null to the end of the string
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 23 Jul 2013 09:58:57 +0000 (13:58 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 23 Jul 2013 09:58:57 +0000 (13:58 +0400)
writer/swap_writer_module.c

index 8bc2c7e..95f1ace 100644 (file)
@@ -475,6 +475,8 @@ static int pack_args(char *buf, int len, const char *fmt, struct pt_regs *regs)
                        if (ret < 0)
                                return -EFAULT;
 
+                       buf[ret] = '\0';
+
                        buf += ret + 1;
                        len -= ret + 1;
                }