Skip to content
Snippets Groups Projects
Commit e71404e5 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

lib: media: fix use-after-free

Regression from c9ab8bd8

Fixes #26367
parent 785d1745
No related branches found
Tags 3.0.17.3
No related merge requests found
......@@ -866,10 +866,13 @@ libvlc_media_get_stat( libvlc_media_t *p_md, unsigned type, uint64_t *out )
char *end;
unsigned long long val = strtoull( str, &end, 10 );
free( str );
if( *end != '\0' )
{
free( str );
return -1;
}
free( str );
*out = val;
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment