[vlc-commits] playlist: sort: Fix potential null dereference

Hugo Beauzée-Luyssen git at videolan.org
Wed Mar 29 09:57:57 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Mar 29 09:56:15 2017 +0200| [62449bef5829693ce91729fee5bd1933d25f9cf4] | committer: Hugo Beauzée-Luyssen

playlist: sort: Fix potential null dereference

Fix CID #1403397 #1403398

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

 src/playlist/sort.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/playlist/sort.c b/src/playlist/sort.c
index f3a3c69..a5c97a6 100644
--- a/src/playlist/sort.c
+++ b/src/playlist/sort.c
@@ -86,6 +86,8 @@ static inline int meta_sort( const playlist_item_t *first,
     else if( first->i_children >= 0 && second->i_children >= 0 )
         i_ret = meta_strcasecmp_title( first, second );
     /* Both are items */
+    else if( !psz_first && !psz_second )
+        i_ret = 0;
     else if( !psz_first && psz_second )
         i_ret = 1;
     else if( psz_first && !psz_second )



More information about the vlc-commits mailing list