From 49f0faafe14dfea7c41791db99282de738c59bad Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 17 Jul 2005 16:52:14 +0000 Subject: Fix filename string reallocation in plugin loader. (Based on a patch from Stefan Bruens .) CVS patchset: 7648 CVS date: 2005/07/17 16:52:14 --- src/xine-engine/load_plugins.c | 10 +++++----- 1 file 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; -- cgit v1.2.3