[vlc-commits] [Git][videolan/vlc][master] stream: explicitly read 1 byte into a uint8_t
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Sep 27 06:58:50 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
69b2adec by Steve Lhomme at 2025-09-27T06:43:37+00:00
stream: explicitly read 1 byte into a uint8_t
>From the tests, read and asserts around, there is only one byte
left in the stream. We don't need to try read more. It's only
used for logging.
Fixes #29376
- - - - -
1 changed file:
- src/input/stream.c
Changes:
=====================================
src/input/stream.c
=====================================
@@ -284,8 +284,7 @@ char *vlc_stream_ReadLine( stream_t *s )
{
assert( priv->text.char_width == 2 );
uint8_t inc;
- ssize_t i_inc = vlc_stream_Read( s, &inc, priv->text.char_width );
- assert( i_inc == i_data );
+ ssize_t i_inc = vlc_stream_Read( s, &inc, 1 );
if( i_inc > 0 )
msg_Err( s, "discarding incomplete UTF-16 sequence at EOF: 0x%02x", inc );
return NULL;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/69b2adecc0cb08e89fa0d2fe96be744e494d822f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/69b2adecc0cb08e89fa0d2fe96be744e494d822f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list