gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog libbase/sharedlib.cpp


From: Bastiaan Jacques
Subject: [Gnash-commit] gnash ChangeLog libbase/sharedlib.cpp
Date: Wed, 22 Nov 2006 12:02:49 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Bastiaan Jacques <bjacques>     06/11/22 12:02:49

Modified files:
        .              : ChangeLog 
        libbase        : sharedlib.cpp 

Log message:
        getcwd() should be passed a buffer of
                size at least equal to PATH_MAX. Fix an invalid dereference of
                the buffer pointer, too.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1706&r2=1.1707
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/sharedlib.cpp?cvsroot=gnash&r1=1.3&r2=1.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1706
retrieving revision 1.1707
diff -u -b -r1.1706 -r1.1707
--- ChangeLog   22 Nov 2006 11:49:55 -0000      1.1706
+++ ChangeLog   22 Nov 2006 12:02:49 -0000      1.1707
@@ -1,3 +1,9 @@
+2006-11-22 Bastiaan Jacques <address@hidden>
+
+       * libbase/sharedlib.cpp: getcwd() should be passed a buffer of 
+       size at least equal to PATH_MAX. Fix an invalid dereference of 
+       the buffer pointer, too.
+
 2006-11-22 Sandro Santilli <address@hidden>
 
        * testsuite/misc-ming.all/ButtonEventsTest-Runner.cpp: updated

Index: libbase/sharedlib.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/sharedlib.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- libbase/sharedlib.cpp       11 Nov 2006 14:36:33 -0000      1.3
+++ libbase/sharedlib.cpp       22 Nov 2006 12:02:49 -0000      1.4
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: sharedlib.cpp,v 1.3 2006/11/11 14:36:33 strk Exp $ */
+/* $Id: sharedlib.cpp,v 1.4 2006/11/22 12:02:49 bjacques Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -98,7 +98,7 @@
     GNASH_REPORT_FUNCTION;
     
     int errors = 0;
-    char pwd[512];
+    char pwd[PATH_MAX];
 
 #if 0
     struct stat ostats;
@@ -140,7 +140,7 @@
     // if the GNASH_PLUGINS environment variable isn't set.
     const char *plugindir = (char *)getenv ("GNASH_PLUGINS");
     if (plugindir == NULL) {
-        getcwd((char *)&pwd, 512);
+        getcwd(pwd, PATH_MAX);
         plugindir = pwd;
         dbglogfile << "WARNING: using default DL search path" << endl;
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]