fix gcc format security error.
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Nov 2015 14:38:01 +0000 (15:38 +0100)
committerJohn Crispin <blogic@openwrt.org>
Sun, 22 Nov 2015 15:38:06 +0000 (16:38 +0100)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
block.c

diff --git a/block.c b/block.c
index 4c8dda9..c6d1b90 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1311,7 +1311,7 @@ static int main_swapon(int argc, char **argv)
                                return -1;
                        }
                        while (getline(&lineptr, &s, fp) > 0)
                                return -1;
                        }
                        while (getline(&lineptr, &s, fp) > 0)
-                               printf(lineptr);
+                               printf("%s", lineptr);
                        if (lineptr)
                                free(lineptr);
                        fclose(fp);
                        if (lineptr)
                                free(lineptr);
                        fclose(fp);