[vlc-commits] access/http: Control: fix STREAM_GET_SIZE
Filip Roséen
git at videolan.org
Wed Mar 22 08:23:50 CET 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Wed Mar 22 04:38:21 2017 +0100| [e2ba9841fbb63d8a40003dd2baaf4f7dbcffbb6c] | committer: Rémi Denis-Courmont
access/http: Control: fix STREAM_GET_SIZE
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.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e2ba9841fbb63d8a40003dd2baaf4f7dbcffbb6c
---
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 77de475..8bda86d 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;
/* */
More information about the vlc-commits
mailing list