Perl (5.10) seems to handle this this way, util.c:
for apidoc my_snprintf

   The C library C<snprintf> functionality, if available and
   standards-compliant (uses C<vsnprintf>, actually).  However, if the
   C<vsnprintf> is not available, will unfortunately use the unsafe
   C<vsprintf> which can overrun the buffer (there is an overrun check,
   but that may be too late).  Consider using C<sv_vcatpvf> instead, or
   getting C<vsnprintf>.

int
   Perl_my_snprintf(char *buffer, const Size_t len, const char *format, 
...)
   {
       dTHX;
       int retval;
       va_list ap;
       va_start(ap, format);
   #ifdef HAS_VSNPRINTF
       retval = vsnprintf(buffer, len, format, ap);
   #else
       retval = vsprintf(buffer, format, ap);
   #endif
       va_end(ap);

a

Andy Bach
Systems Mangler
Internet: [EMAIL PROTECTED]
Voice: (608) 261-5738 Fax: 264-5932

Windows defenstrated - sent from my MacBook Pro!!!

Reply via email to