-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/08/16 00:58, Selva Nair wrote:
> - Replace %zu by %u and cast the size_t variable to (unsigned int).
> The cast should be safe as in all instances the number involved is
> small.
> 
> Note: mingw64 targets msvcrt.dll runtime that doesn't support %zu
> and print "zu" instead of the number. With -Wformat the compiler 
> does warn that z is an unknown conversion type.
> 
> v2: Cast to (unsigned int) instead of (int).
> 
> Signed-off-by: Selva Nair <selva.n...@gmail.com> --- 
> src/openvpn/crypto.c      |    4 ++-- src/openvpn/options.c     |
> 4 ++-- src/openvpn/ssl_mbedtls.c |    4 ++-- 3 files changed, 6
> insertions(+), 6 deletions(-)

ACK.

I've double checked that all places converted from %zu to %u are do
only the size_t type (which on at least Linux map to unsigned int -
sorry, don't have Windows handy).  But given that these values are
mostly MTU, crypto packet overhead length or crypto key length
related, they shouldn't easily overrun (that would be quite a special
network packet or crypto key).

Just done a simple build on my Linux box (again, sorry, no cross
compiler handy) ... but, last famous words: This change looks sane and
safe.

I'll need to update my git ack-am scripts slightly now that gmane web
is currently dead.  But I'll commit it asap.


- -- 
kind regards,

David Sommerseth
OpenVPN Technologies, Inc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlet4U4ACgkQDC186MBRfrpohwCfS6auj2tZvjunstoCp9unaUDc
OKgAni/nqugO2abrUHLaZrqeHGlx8O95
=DYTu
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to