]> git.pld-linux.org Git - packages/aiksaurus.git/commitdiff
- fputs instead of printf to avoid format security error
authorWitold Filipczyk <witekfl@poczta.onet.pl>
Mon, 6 Jan 2014 12:34:40 +0000 (13:34 +0100)
committerWitold Filipczyk <witekfl@poczta.onet.pl>
Mon, 6 Jan 2014 12:34:40 +0000 (13:34 +0100)
format_security.patch [new file with mode: 0644]

diff --git a/format_security.patch b/format_security.patch
new file mode 100644 (file)
index 0000000..4e7806c
--- /dev/null
@@ -0,0 +1,29 @@
+--- aiksaurus-1.2.1/base/caiksaurus.cpp.orig   2014-01-06 13:27:56.420352733 +0100
++++ aiksaurus-1.2.1/base/caiksaurus.cpp        2014-01-06 13:29:36.108561088 +0100
+@@ -254,7 +254,7 @@ static void handleArguments(int argc, ch
+         /* see if we got --version. */
+         if ( !strcmp(arg, "--version") || !strcmp(arg, "-v") )
+         {
+-            printf(version);
++            fputs(version, stdout);
+             exit(0);
+         }
+@@ -262,7 +262,7 @@ static void handleArguments(int argc, ch
+         else if ( !strcmp(arg, "--help") || !strcmp(arg, "-h") )
+         {
+             printf("Usage: %s [word]\n\n", argv[0]);
+-            printf(help);
++            fputs(help, stdout);
+             exit(0);
+         }   
+     }
+@@ -271,7 +271,7 @@ static void handleArguments(int argc, ch
+     if (argc != 2)
+     {
+         printf("Usage: %s [word]\n", argv[0]);
+-        printf(help);
++        fputs(help, stdout);
+         exit(1);
+     }
+ }
This page took 0.08361 seconds and 4 git commands to generate.