Commit 623d18e6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

url: fix potential segmentation fault in test case

parent 9e52d838
......@@ -92,7 +92,12 @@ static void test_url_parse(const char* in, const char* protocol, const char* use
const char* pass, const char* host, unsigned i_port,
const char* path, const char* option )
{
#define CHECK( a, b ) assert(((a == NULL) && (b == NULL)) || !strcmp((a), (b)))
#define CHECK( a, b ) \
if (a == NULL) \
assert(b == NULL); \
else \
assert(b != NULL && !strcmp((a), (b)))
vlc_url_t url;
vlc_UrlParse( &url, in, '?' );
CHECK( url.psz_protocol, protocol );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment