Re: commit - removed snprintf


Subject: Re: commit - removed snprintf
From: Vlad Harchev (hvv@hippo.ru)
Date: Wed Nov 01 2000 - 00:32:47 CST


On Wed, 1 Nov 2000, sam th wrote:

 Hi Sam,
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Some of the recently committed code included snprintf calls (spec. in
> xap_EncodingManager.cpp). Sadly, snprintf is not yet universally
> available, and is not present on PPC BeOS. Therefore, these snprintf's
> have been replaced by sprintf. If you (Vlad) desperately want snprint,
> then you need to find some way to do it so that PPC BeOS still compiles.

 OK. They were needed to disallow buffer overflows in it. But there is a small
probability that they can be encountered.

 I think I have a nice idea on how to cleanly use snprintf on one arch and
sprintf on other without using #ifdefs - the use of CPP macros.

 I will post a solution sometime.
 
>
> sam th
> sam@uchicago.edu
> http://www.abisource.com/~sam/
> GnuPG Key:
> http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0xCABD33FC
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.1 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE5/7xGt+kM0Mq9M/wRAvtKAKDVl8h+s47btYh4rgS2NZKtmGV6kgCgns6A
> 7k+kjwlqAWG1nj5rlUYtidM=
> =Mxof
> -----END PGP SIGNATURE-----
>

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Wed Nov 01 2000 - 00:50:32 CST