Revision: 563 http://sourceforge.net/p/vde/svn/563 Author: rd235 Date: 2013-11-22 09:02:56 +0000 (Fri, 22 Nov 2013) Log Message: ----------- wirefilter bugfix ported to the rd235 experimental version
Modified Paths: -------------- branches/rd235/vde-2/src/wirefilter.c Modified: branches/rd235/vde-2/src/wirefilter.c =================================================================== --- branches/rd235/vde-2/src/wirefilter.c 2013-07-07 08:20:40 UTC (rev 562) +++ branches/rd235/vde-2/src/wirefilter.c 2013-11-22 09:02:56 UTC (rev 563) @@ -813,9 +813,9 @@ static void save_pidfile() { if(pidfile[0] != '/') - strncat(pidfile_path, pidfile, PATH_MAX - strlen(pidfile_path)); + strncat(pidfile_path, pidfile, PATH_MAX - strlen(pidfile_path) - 1); else - strcpy(pidfile_path, pidfile); + strncpy(pidfile_path, pidfile, PATH_MAX - 1); int fd = open(pidfile_path, O_WRONLY | O_CREAT | O_EXCL, @@ -1607,7 +1607,7 @@ /* saves current path in pidfile_path, because otherwise with daemonize() we * forget it */ - if(getcwd(pidfile_path, PATH_MAX-1) == NULL) { + if(getcwd(pidfile_path, PATH_MAX-2) == NULL) { printlog(LOG_ERR, "getcwd: %s", strerror(errno)); exit(1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ vde-users mailing list vde-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vde-users