[quake3-bugzilla] [Bug 5944] Com_sprintf not working properly
    bugzilla-daemon at icculus.org 
    bugzilla-daemon at icculus.org
       
    Fri May 31 03:29:05 EDT 2013
    
    
  
https://bugzilla.icculus.org/show_bug.cgi?id=5944
Simon McVittie <smcv-ioquake3 at pseudorandom.co.uk> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smcv-ioquake3 at pseudorandom.
                   |                            |co.uk
--- Comment #2 from Simon McVittie <smcv-ioquake3 at pseudorandom.co.uk> ---
Com_sprintf() is basically ISO C (v)snprintf(), which doesn't allow this usage:
       C99 and POSIX.1-2001 specify that the results are undefined if  a  call
       to  sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copy‐
       ing to take place between objects that overlap  (e.g.,  if  the  target
       string  array and one of the supplied input arguments refer to the same
       buffer).
If you're writing native code (stuff that ends up in the engine, or
cgame/qagame/ui compiled to native code) then Com_sprintf() is just a wrapper
around (v)snprintf(). If you're writing bytecode (cgame.qvm, qagame.qvm,
ui.qvm), the implementation used is in bg_lib.c.
-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/quake3-bugzilla/attachments/20130531/30e687ad/attachment.html>
    
    
More information about the quake3-bugzilla
mailing list