<div dir="ltr">Is there a problem if the string is not null terminated?  If not, you can snprintf it right into place instead of doing sprintf+mempcy.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 12:29 PM, Paweł Bylica <span dir="ltr"><<a href="mailto:pawel.bylica@ibs.org.pl" target="_blank">pawel.bylica@ibs.org.pl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Recently I was hit by an assert in WinCOFFObjectWriter that <span style="line-height:18px;font-size:12px;font-family:sans-serif">had forbidden storing pointer to string table in header name field when the pointer had more that 6 decimal digits. This limit had been chosen to make implementation easier (sprintf adds null character at the end) and could be increased to 7 digits.</span></div>


<div><br></div><div><font color="#000000" face="sans-serif"><span style="font-size:12px;line-height:18px">My patch is attached. The implementation uses additional buffer on the stack to make integer to string conversion.</span></font></div>
<span class="HOEnZb"><font color="#888888">

<div><font color="#000000" face="sans-serif"><span style="font-size:12px;line-height:18px"><br></span></font></div><div><font color="#000000" face="sans-serif"><span style="font-size:12px;line-height:18px">- Paweł Bylica</span></font></div>


</font></span></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>