<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>With the help of drmemory (</span><a href="http://code.google.com/p/drmemory"><span lang=EN-US>http://code.google.com/p/drmemory</span></a><span lang=EN-US>), I found a crash problem for vlc –H in the git version.<br><br>contrib/win32/x264/x264.h define:<br>static const char * const x264_profile_names[] = { "baseline", "main", "high", "high10", "high422", "high444", 0 };<br>The last item is here 0. This is not the only case where a list is 0 terminated.<br><br>modules/codec/x264.c calls:<br>change_string_list( x264_profile_names, x264_profile_names )<br>which compute the size of the list with:<br>(size_t)(sizeof (list) / sizeof (char *))<br>Here the size of the list (p_item->list_count) is one more than needed because of the NULL item at the end of the x264_profile_names list.<br><br>src/config/help.c use for CONFIG_ITEM_STRING:<br>for( i = 0; i < p_item->list_count; i++ )<br>{<br>if( i ) strcat( psz_buffer, "," );<br>strcat( psz_buffer, p_item->list.psz[i] );<br>}<br>The strcat fail for the last NULL item.<br><br>We have to add the following in the loop:<br>if( p_item->list.psz[i] == NULL ) break;<br><br>For CONFIG_ITEM_INTEGER, it can be:<br>if( p_item->list_text[i] == NULL ) break;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Here is an attached patch.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Cheers<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Armand Bendanan<o:p></o:p></span></p><p class=MsoNormal><i><span lang=EN-US style='font-size:10.0pt'><o:p> </o:p></span></i></p></div></body></html>