<html><head></head><body>memccpy is POSIX not ISO, but it could be added in compat/ if needed.<br><br><div class="gmail_quote">Le 5 septembre 2019 09:23:57 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Is memccpy() part of the C standard ?<br>What's wrong with strncpy ?<br><br>On 2019-09-05 1:50, Alexandre Janniaux wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><hr> modules/mux/ogg.c | 5 +++--<br> 1 file changed, 3 insertions(+), 2 deletions(-)<br><br>diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c<br>index 82e5e90aa2..4a256b4d6a 100644<br>--- a/modules/mux/ogg.c<br>+++ b/modules/mux/ogg.c<br>@@ -499,10 +499,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )<br><br> memcpy( p_stream->p_oggds_header->stream_type, "audio", 5 );<br><br>- memset( p_stream->p_oggds_header->sub_type, 0, 4 );<br> char buf[5];<br> snprintf( buf, sizeof(buf), "%"PRIx16, i_tag );<br>- strncpy( p_stream->p_oggds_header->sub_type, buf, 4 );<br>+<br>+ memset( p_stream->p_oggds_header->sub_type, 0, 4 );<br>+ memccpy( p_stream->p_oggds_header->sub_type, buf, '\0', 4 );<br><br> p_stream->p_oggds_header->i_time_unit = MSFTIME_FROM_SEC(1);<br> p_stream->p_oggds_header->i_default_len = 1;<br>--<br>2.23.0<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>