[Webkit-unassigned] [Bug 140917] Windows return -1 when calling vsnprintf with arguments that exceed target buffer size

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 28 17:41:57 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=140917

--- Comment #11 from Namhoon Kim <nakim at ea.com> ---
(In reply to comment #8)
> (In reply to comment #7)
> > > Looking over this file, it seems like our 'snprintf' (a few lines above) suffers from the exact same problem. Could you please make the same correction there? Then we can land the patch in one go.
> > 
> > I fixed it too. Correcting handled before va_end calling. See below hunk
> > please.
> > 
> >  inline int snprintf(char* buffer, size_t count, const char* format, ...) 
> >  {
> >      int result;
> >      va_list args;
> >      va_start(args, format);
> >      result = _vsnprintf(buffer, count, format, args);
> > +    if (result < 0 && errno != EINVAL)
> > +        result = _vscprintf(format, args);
> >      va_end(args);
> 
> Were you planning up submitting an updated patch? Let me know and I'll try
> to get this in as soon as you have an update.

What I mean is, that hunk already in the patch I submitted. https://bugs.webkit.org/attachment.cgi?id=245424&action=diff

If I miss understand something on this context, please let me know.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150129/615c0f3e/attachment-0002.html>


More information about the webkit-unassigned mailing list