p4merge: fix printf usage
authorDavid Aguilar <davvid@gmail.com>
Sun, 10 Feb 2013 01:21:25 +0000 (17:21 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 10 Feb 2013 19:40:52 +0000 (11:40 -0800)
Do not use a random string as if it is a format string for printf
when showing it literally; instead feed it to '%s' format.

Reported-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mergetools/p4merge

index 52f7c8f70578929432becdd58a7fb423398f8de8..8a36916567a234c354af9994df9c28788749e7fa 100644 (file)
@@ -30,5 +30,5 @@ create_empty_file () {
        empty_file="${TMPDIR:-/tmp}/git-difftool-p4merge-empty-file.$$"
        >"$empty_file"
 
-       printf "$empty_file"
+       printf "%s" "$empty_file"
 }