summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2005-07-17 16:52:14 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2005-07-17 16:52:14 +0000
commit49f0faafe14dfea7c41791db99282de738c59bad (patch)
treedd098251ea717aa4c235b25b8093f54f2d5cadf4
parent5d92deebb2ca77f0f6f6d0e3fdb1a4719dbf74b2 (diff)
downloadxine-lib-49f0faafe14dfea7c41791db99282de738c59bad.tar.gz
xine-lib-49f0faafe14dfea7c41791db99282de738c59bad.tar.bz2
Fix filename string reallocation in plugin loader.
(Based on a patch from Stefan Bruens <lurch@gmx.li>.) CVS patchset: 7648 CVS date: 2005/07/17 16:52:14
-rw-r--r--src/xine-engine/load_plugins.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 06d6c27e8..9cdedc2fd 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: load_plugins.c,v 1.208 2005/05/14 16:00:40 miguelfreitas Exp $
+ * $Id: load_plugins.c,v 1.209 2005/07/17 16:52:14 dsalt Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -525,18 +525,18 @@ static void collect_plugins(xine_t *this, char *path){
dir = opendir(path);
if (dir) {
struct dirent *pEntry;
- int path_len;
+ size_t path_len, str_size;
char *str = NULL;
path_len = strlen(path);
- str = malloc(path_len * 2 + 2); /* +2 for '/' and '\0' */
+ str_size = path_len * 2 + 2; /* +2 for '/' and '\0' */
+ str = malloc(str_size);
xine_fast_memcpy(str, path, path_len);
str[path_len] = '/';
str[path_len + 1] = '\0';
while ((pEntry = readdir (dir)) != NULL) {
- size_t str_size = 0;
- size_t new_str_size = 0;
+ size_t new_str_size;
void *lib = NULL;
plugin_info_t *info = NULL;