Revision: 6909
http://playerstage.svn.sourceforge.net/playerstage/?rev=6909&view=rev
Author: thjc
Date: 2008-07-23 06:08:05 +0000 (Wed, 23 Jul 2008)
Log Message:
-----------
Merged 6673 from 2-1
fixed uninitialised memory in array reallocation.
Modified Paths:
--------------
code/player/trunk/libplayercore/filewatcher.cc
Property Changed:
----------------
code/player/trunk/
Property changes on: code/player/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /code/player/branches/release-2-1-patches:6672
+ /code/player/branches/release-2-1-patches:6672-6673
Modified: code/player/trunk/libplayercore/filewatcher.cc
===================================================================
--- code/player/trunk/libplayercore/filewatcher.cc 2008-07-23 06:01:19 UTC
(rev 6908)
+++ code/player/trunk/libplayercore/filewatcher.cc 2008-07-23 06:08:05 UTC
(rev 6909)
@@ -145,8 +145,10 @@
if (next_entry == NULL)
{
// otherwise we allocate some more room for the array
+ size_t orig_size = WatchedFilesArraySize;
WatchedFilesArraySize*=2;
WatchedFiles = reinterpret_cast<struct fd_driver_pair
*> (realloc(WatchedFiles,sizeof(WatchedFiles[0])*WatchedFilesArraySize));
+
memset(&WatchedFiles[orig_size],0,sizeof(WatchedFiles[0])*(WatchedFilesArraySize-orig_size));
next_entry = &WatchedFiles[WatchedFilesArrayCount];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit