[vlc-devel] commit: Fix sizeof misuse and variable uninitialization (Pierre Ynard )

git version control git at videolan.org
Tue Jan 13 18:33:03 CET 2009


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Jan 13 15:14:22 2009 +0100| [1710203763f3573b632b2c999104f626a2d5755e] | committer: Rémi Denis-Courmont 

Fix sizeof misuse and variable uninitialization

Unbreaks start-up on WinCE.

Signed-off-by: Rémi Denis-Courmont <rdenis at simphalempin.com>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1710203763f3573b632b2c999104f626a2d5755e
---

 src/modules/os.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/os.c b/src/modules/os.c
index ca0e214..d1d8384 100644
--- a/src/modules/os.c
+++ b/src/modules/os.c
@@ -321,8 +321,8 @@ static void *module_Lookup( module_handle_t handle, const char *psz_function )
     }
 
 #elif defined(HAVE_DL_WINDOWS) && defined(UNDER_CE)
-    wchar_t wide[sizeof( psz_function ) + 1];
-    size_t i;
+    wchar_t wide[strlen( psz_function ) + 1];
+    size_t i = 0;
     do
         wide[i] = psz_function[i]; /* UTF-16 <- ASCII */
     while( psz_function[i++] );




More information about the vlc-devel mailing list