[vlc-devel] [PATCH 1/2] access/http: Control: fix STREAM_GET_SIZE
Filip Roséen
filip at atch.se
Wed Mar 22 04:38:21 CET 2017
When a stream-control receives STREAM_GET_SIZE it is supposed to write
the size to an uint64_t. The previous implementation would treat the
passed pointer as int64_t, effectivelly causing undefined-behavior.
These changes fixes that.
---
modules/access/http.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/access/http.c b/modules/access/http.c
index 77de475fbd..8bda86d978 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -597,8 +597,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case STREAM_GET_SIZE:
if( !p_sys->b_has_size )
return VLC_EGENERIC;
- pi_64 = (int64_t*)va_arg( args, int64_t * );
- *pi_64 = p_sys->size;
+ *va_arg( args, uint64_t*) = p_sys->size;
break;
/* */
--
2.12.0
More information about the vlc-devel
mailing list