[totem] Check number of args in playlist.add in Cone



commit 4357329e301e96365540c0697ed42b6ca7e518c5
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Nov 20 14:43:58 2009 +0000

    Check number of args in playlist.add in Cone

 browser-plugin/totemConePlaylist.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/browser-plugin/totemConePlaylist.cpp b/browser-plugin/totemConePlaylist.cpp
index 14b3ecf..d5854d3 100644
--- a/browser-plugin/totemConePlaylist.cpp
+++ b/browser-plugin/totemConePlaylist.cpp
@@ -80,11 +80,11 @@ totemConePlaylist::InvokeByIndex (int aIndex,
         return false;
 
       NPString title;
-      if (!GetNPStringFromArguments (argv, argc, 1, title))
+      if (argc != 3 || !GetNPStringFromArguments (argv, argc, 1, title))
         title.UTF8Characters = NULL;
 
       NPString options;
-      if (!GetNPStringFromArguments (argv, argc, 2, options))
+      if (argc != 3 || !GetNPStringFromArguments (argv, argc, 2, options))
         options.UTF8Characters = NULL;
       //FIXME handle options as array
       //http://wiki.videolan.org/Documentation:WebPlugin#Playlist_object



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]