PatchSet 7200 
Date: 2006/03/28 23:38:10
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
fixed pscan security warnings

2006-03-28  Dalibor Topic  <[EMAIL PROTECTED]>

        * kaffe/kaffe/main.c,
        kaffe/kaffe/version.c,
        kaffe/kaffeh/main.c:
        Fixed pscan security warnings.

Members: 
        ChangeLog:1.4707->1.4708 
        kaffe/kaffe/main.c:1.98->1.99 
        kaffe/kaffe/version.c:1.16->1.17 
        kaffe/kaffeh/main.c:1.21->1.22 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4707 kaffe/ChangeLog:1.4708
--- kaffe/ChangeLog:1.4707      Tue Mar 28 22:19:18 2006
+++ kaffe/ChangeLog     Tue Mar 28 23:38:10 2006
@@ -1,5 +1,12 @@
 2006-03-28  Dalibor Topic  <[EMAIL PROTECTED]>
 
+       * kaffe/kaffe/main.c,
+       kaffe/kaffe/version.c,
+       kaffe/kaffeh/main.c:
+       Fixed pscan security warnings.
+
+2006-03-28  Dalibor Topic  <[EMAIL PROTECTED]>
+
        * external/gcc/fastjar/jartool.c: Cast filenames to char*
        before calling canonical_filename to fix compiler warnings.
 
Index: kaffe/kaffe/kaffe/main.c
diff -u kaffe/kaffe/kaffe/main.c:1.98 kaffe/kaffe/kaffe/main.c:1.99
--- kaffe/kaffe/kaffe/main.c:1.98       Sat Mar 25 21:28:19 2006
+++ kaffe/kaffe/kaffe/main.c    Tue Mar 28 23:38:14 2006
@@ -402,7 +402,7 @@
        /* Get longer buffer FIXME:  free the old one */
                if ((newbootcpath = malloc(bootcpathlength)) == NULL) 
        {
-               fprintf(stderr,  _("Error: out of memory.\n"));
+               fprintf(stderr, "%s", _("Error: out of memory.\n"));
                 exit(EXIT_FAILURE);
        }
 
@@ -496,7 +496,7 @@
 
                        /* Get longer buffer FIXME:  free the old one */
                        if ((newcpath = malloc(cpathlength)) == NULL) {
-                               fprintf(stderr,  _("Error: out of memory.\n"));
+                               fprintf(stderr,  "%s", _("Error: out of 
memory.\n"));
                                exit(EXIT_FAILURE);
                        }
 
@@ -559,7 +559,7 @@
 
                         /* Get longer buffer FIXME:  free the old one */
                         if ((newbootcpath = malloc(bootcpathlength)) == NULL) {
-                                fprintf(stderr,  _("Error: out of memory.\n"));
+                                fprintf(stderr,  "%s", _("Error: out of 
memory.\n"));
                                 exit(EXIT_FAILURE);
                         }
 
@@ -586,7 +586,7 @@
 
                        /* Get longer buffer FIXME:  free the old one */
                        if ((newbootcpath = malloc(bootcpathlength)) == NULL) {
-                               fprintf(stderr,  _("Error: out of memory.\n"));
+                               fprintf(stderr,  "%s", _("Error: out of 
memory.\n"));
                                exit(EXIT_FAILURE);
                        }
 
@@ -611,7 +611,7 @@
 
                        /* Get longer buffer FIXME:  free the old one */
                        if ((newbootcpath = malloc(bootcpathlength)) == NULL) {
-                               fprintf(stderr,  _("Error: out of memory.\n"));
+                               fprintf(stderr,  "%s", _("Error: out of 
memory.\n"));
                                exit(EXIT_FAILURE);
                        }
 
@@ -636,7 +636,7 @@
 
                        /* Get longer buffer FIXME:  free the old one */
                        if ((newbootcpath = malloc(bootcpathlength)) == NULL) {
-                               fprintf(stderr,  _("Error: out of memory.\n"));
+                               fprintf(stderr,  "%s", _("Error: out of 
memory.\n"));
                                exit(EXIT_FAILURE);
                        }
 
@@ -651,7 +651,7 @@
                        if (argv[i][j] == 0) {
                                i++;
                                if (argv[i] == 0) {
-                                       fprintf(stderr, _("Error: No stack size 
found for -ss option.\n"));
+                                       fprintf(stderr, "%s", _("Error: No 
stack size found for -ss option.\n"));
                                        exit(EXIT_FAILURE);
                                }
                                sz = parseSize(argv[i]);
@@ -659,7 +659,7 @@
                                sz = parseSize(&argv[i][j]);
                        }
                        if (sz < THREADSTACKSIZE) {
-                               fprintf(stderr,  _("Warning: Attempt to set 
stack size smaller than %d - ignored.\n"), THREADSTACKSIZE);
+                               fprintf(stderr, _("Warning: Attempt to set 
stack size smaller than %d - ignored.\n"), THREADSTACKSIZE);
                        }
                        else {
                                vmargs.nativeStackSize = sz;
@@ -670,7 +670,7 @@
                        if (argv[i][j] == 0) {
                                i++;
                                if (argv[i] == 0) {
-                                       fprintf(stderr,  _("Error: No heap size 
found for -mx option.\n"));
+                                       fprintf(stderr,  "%s", _("Error: No 
heap size found for -mx option.\n"));
                                        exit(EXIT_FAILURE);
                                }
                                if (strcmp(argv[i], "unlimited") == 0)
@@ -689,7 +689,7 @@
                        if (argv[i][j] == 0) {
                                i++;
                                if (argv[i] == 0) {
-                                       fprintf(stderr,  _("Error: No heap size 
found for -ms option.\n"));
+                                       fprintf(stderr,  "%s", _("Error: No 
heap size found for -ms option.\n"));
                                        exit(EXIT_FAILURE);
                                }
                                vmargs.minHeapSize = parseSize(argv[i]);
@@ -701,7 +701,7 @@
                        if (argv[i][3] == 0) {
                                i++;
                                if (argv[i] == 0) {
-                                       fprintf(stderr,  _("Error: No heap size 
found for -as option.\n"));
+                                       fprintf(stderr,  "%s", _("Error: No 
heap size found for -as option.\n"));
                                        exit(EXIT_FAILURE);
                                }
                                vmargs.allocHeapSize = parseSize(argv[i]);
@@ -747,7 +747,7 @@
 
                        newcpath = (char *)malloc (cpathlength);
                        if (newcpath == NULL) {
-                               fprintf(stderr,  _("Error: out of memory.\n"));
+                               fprintf(stderr,  "%s", _("Error: out of 
memory.\n"));
                                exit(EXIT_FAILURE);
                        }
 
@@ -799,13 +799,13 @@
                        i++;
                        if (argv[i] == 0) {
                                fprintf(stderr, 
-                                       _("Error: -Xxprof_syms option requires "
+                                       "%s", _("Error: -Xxprof_syms option 
requires "
                                        "a file name.\n"));
                        }
                        else if( !profileSymbolFile(argv[i]) )
                        {
                                fprintf(stderr, 
-                                       _("Unable to create profiler symbol "
+                                        _("Unable to create profiler symbol "
                                        "file %s.\n"),
                                        argv[i]);
                        }
@@ -814,7 +814,7 @@
                        i++;
                        if (argv[i] == 0) {
                                fprintf(stderr, 
-                                       _("Error: -Xxprof_gmon option requires "
+                                       "%s", _("Error: -Xxprof_gmon option 
requires "
                                        "a file name.\n"));
                        }
                        else if (!profileGmonFile(argv[i]))
@@ -834,7 +834,7 @@
                        i++;
                        if (argv[i] == 0) {
                                fprintf(stderr, 
-                                       _("Error: -Xxdebug_file option requires 
"
+                                       "%s", _("Error: -Xxdebug_file option 
requires "
                                        "a file name.\n"));
                        }
                        else
@@ -848,7 +848,7 @@
                        i++;
                        if (argv[i] == 0) {
                                fprintf(stderr, 
-                                       _("Error: -Xfeedback option requires a "
+                                       "%s", _("Error: -Xfeedback option 
requires a "
                                        "file name.\n"));
                        }
                        else
@@ -866,7 +866,7 @@
                         i++;
                         if (argv[i] == 0) { /* forgot second arg */
                                 fprintf(stderr, 
-                                       _("Error: -vmstats option requires a "
+                                       "%s", _("Error: -vmstats option 
requires a "
                                        "second arg.\n"));
                                 exit(EXIT_FAILURE);
                         }
@@ -878,7 +878,7 @@
                         i++;
                         if (argv[i] == 0) { /* forgot second arg */
                                 fprintf(stderr, 
-                                       _("Error: -vmdebug option requires a "
+                                       "%s", _("Error: -vmdebug option 
requires a "
                                        "debug flag. Use `list' for a 
list.\n"));
                                 exit(EXIT_FAILURE);
                         }
@@ -891,13 +891,13 @@
                         i++;
                         if (argv[i] == 0) { /* forgot second arg */
                                 fprintf(stderr, 
-                                       _("Error: -debug-fd an open 
descriptor.\n"));
+                                       "%s", _("Error: -debug-fd an open 
descriptor.\n"));
                                 exit(EXIT_FAILURE);
                         }
                        dbgSetDprintfFD(strtol(argv[i], &end, 10));
                        if (end != 0 && *end != '\0') {
                                fprintf(stderr,
-                                       _("Error: -debug-fd requires an 
integer.\n"));
+                                       "%s", _("Error: -debug-fd requires an 
integer.\n"));
                                exit(EXIT_FAILURE);
                        }
                 }
@@ -924,7 +924,7 @@
                        i++;
                }
                else {
-                       fprintf(stderr,  _("Unknown flag: %s\n"), argv[i]);
+                       fprintf(stderr, _("Unknown flag: %s\n"), argv[i]);
                }
        }
 
@@ -940,15 +940,15 @@
 usage(void)
 {
        fprintf(stderr,
-               _("usage: kaffe [-options] class\n"
+               "%s", _("usage: kaffe [-options] class\n"
                  "Options are:\n"
                  "     -help                    Print this message\n"
                  "     -version                 Print version number\n"
                  "     -fullversion             Print verbose version 
info\n"));
 #if defined(__ia64__)
-       fprintf(stderr, _("     -ia32                    Execute the ia32 
version of Kaffe\n"));
+       fprintf(stderr, "%s", _("       -ia32                    Execute the 
ia32 version of Kaffe\n"));
 #endif
-       fprintf(stderr, _("     -ss <size>               Maximum native stack 
size\n"
+       fprintf(stderr, "%s", _("       -ss <size>               Maximum native 
stack size\n"
                          "     -mx <size>               Maximum heap size\n"
                          "     -ms <size>               Initial heap size\n"
                          "     -as <size>               Heap increment\n"
@@ -968,45 +968,45 @@
                          "     -verbosecall             Print detailed call 
flow information\n"
                          "     -nodeadlock              Disable deadlock 
detection\n"));
 #if defined(KAFFE_PROFILER)
-       fprintf(stderr, _("     -prof                    Enable profiling of 
Java methods\n"));
+       fprintf(stderr, "%s", _("       -prof                    Enable 
profiling of Java methods\n"));
 #endif
 #if defined(KAFFE_XPROFILER)
-       fprintf(stderr, _("     -Xxprof                  Enable cross language 
profiling\n"
+       fprintf(stderr, "%s", _("       -Xxprof                  Enable cross 
language profiling\n"
                          "     -Xxprof_syms <file>      Name of the profiling 
symbols file [Default: kaffe-jit-symbols.s]\n"
                          "     -Xxprof_gmon <file>      Base name for gmon 
files [Default: xgmon.out]\n"));
 #endif
 #if defined(KAFFE_XDEBUGGING)
-       fprintf(stderr, _("     -Xxdebug_file <file>     Name of the debugging 
symbols file\n"));
+       fprintf(stderr, "%s", _("       -Xxdebug_file <file>     Name of the 
debugging symbols file\n"));
 #endif
 #if defined(KAFFE_FEEDBACK)
-       fprintf(stderr, _("     -Xfeedback <file>        The file name to write 
feedback data to\n"));
+       fprintf(stderr, "%s", _("       -Xfeedback <file>        The file name 
to write feedback data to\n"));
 #endif
-       fprintf(stderr, _("     -debug *                 Trace method calls\n"
+       fprintf(stderr, "%s", _("       -debug *                 Trace method 
calls\n"
                          "     -noasyncgc *             Do not garbage collect 
asynchronously\n"
                          "     -cs, -checksource *      Check source against 
class files\n"
                          "     -oss <size> *            Maximum java stack 
size\n"
                          "     -jar                     Executable is a 
JAR\n"));
 #ifdef KAFFE_VMDEBUG
-        fprintf(stderr, _("    -vmdebug <flag{,flag}>   Internal VM debugging. 
 Set flag=list for a list\n"));
+        fprintf(stderr, "%s", _("      -vmdebug <flag{,flag}>   Internal VM 
debugging.  Set flag=list for a list\n"));
 #endif
-        fprintf(stderr, _("    -debug-fd <descriptor>   Descriptor to send 
debug info to\n"));
+        fprintf(stderr, "%s", _("      -debug-fd <descriptor>   Descriptor to 
send debug info to\n"));
 #ifdef KAFFE_STATS
-        fprintf(stderr, _("    -vmstats <flag{,flag}>   Print VM statistics.  
Set flag=all for all\n"));
+        fprintf(stderr, "%s", _("      -vmstats <flag{,flag}>   Print VM 
statistics.  Set flag=all for all\n"));
 #endif
 #if defined(USE_GMP)
-        fprintf(stderr, _("    -Xnative-big-math        Use GMP for faster, 
native bignum calculations\n"));
+        fprintf(stderr, "%s", _("      -Xnative-big-math        Use GMP for 
faster, native bignum calculations\n"));
 #endif /* defined(USE_GMP) */
 #ifdef KAFFE_X_AWT_INCLUDED
-       fprintf(stderr, _("     -Xkaffe-xlib-awt         Use Kaffe's Xlib AWT 
backend\n"));
+       fprintf(stderr, "%s", _("       -Xkaffe-xlib-awt         Use Kaffe's 
Xlib AWT backend\n"));
 #endif
 #ifdef KAFFE_QT_AWT_INCLUDED
-       fprintf(stderr, _("     -Xkaffe-qt-awt           Use Kaffe's 
Qt2/3/Embedded AWT backend\n"));
+       fprintf(stderr, "%s", _("       -Xkaffe-qt-awt           Use Kaffe's 
Qt2/3/Embedded AWT backend\n"));
 #endif
 #ifdef KAFFE_NANOX_AWT_INCLUDED
-       fprintf(stderr, _("     -Xkaffe-nanox-awt        Use Kaffe's Nano-X AWT 
backend\n"));
+       fprintf(stderr, "%s", _("       -Xkaffe-nanox-awt        Use Kaffe's 
Nano-X AWT backend\n"));
 #endif
 
-       fprintf(stderr, _("  * Option currently ignored.\n"
+       fprintf(stderr, "%s", _("  * Option currently ignored.\n"
                          "\n"
                          "Compatibility options:\n"
                          "     -Xss <size>              Maximum native stack 
size\n"
Index: kaffe/kaffe/kaffe/version.c
diff -u kaffe/kaffe/kaffe/version.c:1.16 kaffe/kaffe/kaffe/version.c:1.17
--- kaffe/kaffe/kaffe/version.c:1.16    Sat Aug 20 22:34:01 2005
+++ kaffe/kaffe/kaffe/version.c Tue Mar 28 23:38:14 2006
@@ -42,8 +42,8 @@
                versionfd = stderr;
        fprintf(versionfd, "java full version \"kaffe-1.4.2\"\n\n");
        fprintf(versionfd, "%s VM \"%s\"\n\n", PACKAGE, PACKAGE_VERSION);
-       fprintf(versionfd,
-                      _("Copyright (c) 1996-2005 Kaffe.org project 
contributors (please see\n"
+       fprintf(versionfd, "%s", 
+                      _("Copyright (c) 1996-2006 Kaffe.org project 
contributors (please see\n"
                        "  the source code for a full list of contributors).  
All rights reserved.\n"
                        "Portions Copyright (c) 1996-2002 Transvirtual 
Technologies, Inc.\n\n"
                        "The Kaffe virtual machine is free software, licensed 
under the terms of\n"
Index: kaffe/kaffe/kaffeh/main.c
diff -u kaffe/kaffe/kaffeh/main.c:1.21 kaffe/kaffe/kaffeh/main.c:1.22
--- kaffe/kaffe/kaffeh/main.c:1.21      Thu Feb  9 22:14:15 2006
+++ kaffe/kaffe/kaffeh/main.c   Tue Mar 28 23:38:14 2006
@@ -245,7 +245,7 @@
        bootclasspath = malloc(1);
        if (bootclasspath == NULL) 
          {
-           fprintf(stderr,  _("Error: out of memory.\n"));
+           fprintf(stderr, "%s", _("Error: out of memory.\n"));
            exit(EXIT_FAILURE);
          }
        *bootclasspath = '\0';
@@ -253,7 +253,7 @@
        classpath = malloc(1);
        if (classpath == NULL) 
          {
-           fprintf(stderr,  _("Error: out of memory.\n"));
+           fprintf(stderr, "%s",  _("Error: out of memory.\n"));
            exit(EXIT_FAILURE);
          }
        *classpath = '\0';
@@ -300,7 +300,7 @@
                  newcp = malloc(cplen);
                  if (newcp == NULL)
                    {
-                     fprintf(stderr,  _("Error: out of memory.\n"));
+                     fprintf(stderr, "%s", _("Error: out of memory.\n"));
                      exit(EXIT_FAILURE);
                    }
                  
@@ -325,7 +325,7 @@
                  newcp = malloc(cplen);
                  if (newcp == NULL)
                    {
-                     fprintf(stderr,  _("Error: out of memory.\n"));
+                     fprintf(stderr, "%s", _("Error: out of memory.\n"));
                      exit(EXIT_FAILURE);
                    }
                  

_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to