Browse Source

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@remlab.net>
pull/54/merge
Filip Roséen 9 years ago
committed by Rémi Denis-Courmont
parent
commit
e2ba9841fb
  1. 3
      modules/access/http.c

3
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;
/* */

Loading…
Cancel
Save