UPnP IGD implementation http://miniupnp.free.fr/
Go to file
Pali Rohár 7d5fdf0743 miniupnpc: Fix usage of Windows _snprintf() function
_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
2020-10-02 22:32:36 +02:00
minissdpd improve syslog 2020-06-08 13:17:16 +02:00
miniupnpc miniupnpc: Fix usage of Windows _snprintf() function 2020-10-02 22:32:36 +02:00
miniupnpc-async update miniupnpc-async/minixml.h 2019-04-23 13:23:07 +02:00
miniupnpc-libevent miniupnpc-libevent: update minixml.c/.h 2019-04-23 13:31:50 +02:00
miniupnpc-libuv Check command line, clean warnings. 2019-02-12 15:46:48 +01:00
miniupnpd fix testnftnlrdr.c 2020-09-29 01:00:29 +02:00
.gitlab-ci.yml update CI scripts 2020-05-02 18:26:46 +02:00
.travis.yml update .travis.yml 2020-06-21 00:03:26 +02:00
CODE_OF_CONDUCT simple CODE_OF_CONDUCT 2017-07-05 23:53:58 +02:00
CONTRIBUTING add CONTRIBUTING file 2017-07-05 23:50:21 +02:00
LICENSE 2019 2019-04-08 14:46:11 +02:00
README update miniupnpd/Changelog.txt and README 2019-09-24 13:02:20 +02:00
appveyor.yml appveyor: python in path 2020-05-06 23:55:10 +02:00
miniupnp.podspec Fix: change dylib id to use @rpath. 2017-05-17 12:56:01 +02:00

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