[LLVMdev] [Patch] WinCOFFObjectWriter: fix for storing pointer to string table in header name field

Reid Kleckner rnk at google.com
Tue Jul 23 09:43:29 PDT 2013

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.

On Tue, Jul 23, 2013 at 12:29 PM, Paweł Bylica <pawel.bylica at ibs.org.pl>wrote:

> Hi,
> Recently I was hit by an assert in WinCOFFObjectWriter that 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.
> My patch is attached. The implementation uses additional buffer on the
> stack to make integer to string conversion.
> - Paweł Bylica
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130723/fba50049/attachment.html>

More information about the llvm-dev mailing list