UPnP IGD implementation
http://miniupnp.free.fr/
7d5fdf0743
_snprintf() differs from snprintf() in: * on overflow it returns -1 instead of required buffer size * on overflow it does not fill nul byte * does not accept NULL/0 as a buffer Microsoft implemented snprintf() in Visual Studio 2015 as part of UCRT. Mingw32 contains snprintf() implementation only when __USE_MINGW_ANSI_STDIO is defined. Mingw-w64 versions prior to 8.0.0. contain snprintf() implementation when __USE_MINGW_ANSI_STDIO or _UCRT is defined. Since version 8.0.0 it is always supported. Mingw-w64 defines both __MINGW32__ and __MINGW64_VERSION_MAJOR macros. Mingw32 defines only __MINGW32__. _scprintf() just count number of bytes needed for formatting string, so it is basically return value of snprintf(). This change updates miniupnpc code to use snprintf() when is provided by compiler/runtime to avoid usage _snprintf(). And also this changes updates miniupnpc emulation of snprintf() by _snprintf() and _scprintf() functions to avoid buffer overflows. For inspiration full emulation of snprintf() by _snprintf() is available in mingw-w64 stdio library: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/stdio/snprintf.c |
||
---|---|---|
minissdpd | ||
miniupnpc | ||
miniupnpc-async | ||
miniupnpc-libevent | ||
miniupnpc-libuv | ||
miniupnpd | ||
.gitlab-ci.yml | ||
.travis.yml | ||
CODE_OF_CONDUCT | ||
CONTRIBUTING | ||
LICENSE | ||
README | ||
appveyor.yml | ||
miniupnp.podspec |
README
-= MiniUPnP project =- Main author : Thomas BERNARD Web site : http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/ Gitlab : https://framagit.org/miniupnp/miniupnp/ Github : https://github.com/miniupnp/miniupnp/ Travis CI : https://travis-ci.org/miniupnp/miniupnp Appveyor : https://ci.appveyor.com/project/miniupnp/miniupnp miniupnpc/ : MiniUPnP client - an UPnP IGD control point miniupnpd/ : MiniUPnP daemon - an implementation of a UPnP IGD + NAT-PMP / PCP gateway minissdpd/ : SSDP managing daemon. Designed to work with miniupnpc, miniupnpd, ReadyMedia (formerly MiniDLNA), etc. miniupnpc-async/ : Proof of concept for a UPnP IGD control point using asynchronous (non blocking) sockets. miniupnpc-libevent/ : UPnP IGD control point using libevent2 http://libevent.org/ Thanks to : * Ryan Wagoner * João Paulo Barraca * Craig Kadziolka * Seth Mos * Rick Richard * Michael van Tellingen * Julien Wajsberg * Jeremy Collake * Matthew Sporleder * Greg Hazel * Rico Huber * Jelle Huitema * Xavier Martin * Thomas Goirand * Darren Reed * Robbie Hanson * Nikos Mavrogiannopoulos * Elsö András * Justin Maggard * David Wu * Michael Trebilcock * Soren Dreijer * Colin McFarlane * Daniel Dickinson * Guillaume Habault * Alexey Osipov * Alexey Kuznetsov * Chiaki Ishikawa * David Kerr * Jardel Weyrich * Leah X. Schmidt * Peter Tatrai * Leo Moll * Daniel Becker * Yonetani Tomokazu * Markus Stenberg * Tomofumi Hayashi * Konstantin Tokarev * Mike Tzou * Nevo Hed * Salva Peiró * Stephan Zeisberg * Ben Barnea of VDOO * Sven Auhagen * Paul Chambers