From: Rafaël Carré Date: Sat, 1 Dec 2007 23:41:47 +0000 (+0000) Subject: vlc_b64_decode_binary_to_buffer(): i_dst is the size of the destination buffer, not... X-Git-Tag: 0.9.0-test0~4305 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ee170e1245a31fcff11eda421428fb8af45ced9b;p=vlc vlc_b64_decode_binary_to_buffer(): i_dst is the size of the destination buffer, not the source buffer --- diff --git a/src/text/strings.c b/src/text/strings.c index 8fd825ac6f..9e0dc45436 100644 --- a/src/text/strings.c +++ b/src/text/strings.c @@ -555,7 +555,7 @@ size_t vlc_b64_decode_binary_to_buffer( uint8_t *p_dst, size_t i_dst, const char int i_level; int i_last; - for( i_level = 0, i_last = 0; i_dst > 0 && *p != '\0'; i_dst--, p++ ) + for( i_level = 0, i_last = 0; (size_t)( p_dst - p_start ) < i_dst && *p != '\0'; p++ ) { const int c = b64[(unsigned int)*p]; if( c == -1 )