[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kioslave/file
From:       Dirk Mueller <mueller () kde ! org>
Date:       2009-05-19 18:29:28
Message-ID: 1242757768.179651.19191.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 970202 by mueller:

when getcwd() fails, the array content is undefined, 
so initialize it


 M  +2 -1      file_unix.cpp  


--- trunk/KDE/kdelibs/kioslave/file/file_unix.cpp #970201:970202
@@ -371,6 +371,7 @@
            as the slave runs in the background, it's hard
            to see for the user what the problem would be */
         char path_buffer[PATH_MAX];
+        path_buffer[0] = '\0';
         (void) getcwd(path_buffer, PATH_MAX - 1);
         if ( chdir( _path.data() ) )  {
             if (errno == EACCES)
@@ -394,7 +395,7 @@
 
         //kDebug(7101) << "============= COMPLETED LIST ============";
 
-        if (path_buffer)
+        if (*path_buffer)
             chdir(path_buffer);
     }
     finished();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic