[vlc-devel] [PATCH] input/item: fix too small psz_scheme array
Thomas Guillem
thomas at gllm.fr
Fri May 13 15:55:47 CEST 2016
Indeed, "qtsound" needs a size of 8.
Use a pointer instead of a fixed size array.
--
My big question is: Is there a reason why this was not done before ? Am I
missing something ?
---
src/input/item.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/input/item.c b/src/input/item.c
index 0dfb820..c0f627f 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1008,7 +1008,7 @@ input_item_t *input_item_Copy( input_item_t *p_input )
struct item_type_entry
{
- const char psz_scheme[7];
+ const char *psz_scheme;
uint8_t i_type;
bool b_net;
};
@@ -1090,7 +1090,7 @@ static int GuessType( const input_item_t *p_item, bool *p_net )
#ifndef NDEBUG
for( size_t i = 1; i < ARRAY_SIZE( tab ); i++ )
- assert( typecmp( tab + i, tab + i - 1 ) > 0 );
+ assert( typecmp( (tab + i)->psz_scheme, tab + i - 1 ) > 0 );
#endif
*p_net = false;
--
2.8.1
More information about the vlc-devel
mailing list