libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit f71019f00b1d4b31b01dac2f98b46040cdd67b7e
parent b0a2a0add1260c25b8b8f807fdddc218a4920293
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 18 Apr 2022 11:00:05 +0300

MHD_get_version(): fixed signed value bit shift

Diffstat:
Msrc/microhttpd/daemon.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -7901,11 +7901,11 @@ MHD_get_version (void) int res = MHD_snprintf_ (ver, sizeof(ver), "%x.%x.%x", - (((int) MHD_VERSION >> 24) & 0xFF), - (((int) MHD_VERSION >> 16) & 0xFF), - (((int) MHD_VERSION >> 8) & 0xFF)); + (int) (((uint32_t) MHD_VERSION >> 24) & 0xFF), + (int) (((uint32_t) MHD_VERSION >> 16) & 0xFF), + (int) (((uint32_t) MHD_VERSION >> 8) & 0xFF)); if ((0 >= res) || (sizeof(ver) <= res)) - return "0.0.0"; /* Can't return real version*/ + return "0.0.0"; /* Can't return real version */ } return ver; #endif /* !PACKAGE_VERSION */