mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
yhttpd/mod_sendfile: fix format string warnings
Origin commit data
------------------
Branch: ni/coolstream
Commit: 44451c7575
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-12-26 (Fri, 26 Dec 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -10,7 +10,7 @@ AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/libconfigfile \
|
||||
@FREETYPE_CFLAGS@
|
||||
|
||||
AM_CPPFLAGS += -fno-rtti -fno-exceptions -D_FILE_OFFSET_BITS=64
|
||||
AM_CPPFLAGS += -fno-rtti -fno-exceptions -D_FILE_OFFSET_BITS=64 -D__STDC_FORMAT_MACROS
|
||||
|
||||
noinst_LIBRARIES = libyhttpdmods.a
|
||||
|
||||
|
@@ -46,6 +46,7 @@
|
||||
#include <pthread.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#include <system/helpers.h>
|
||||
// yhttpd
|
||||
#include <yconfig.h>
|
||||
@@ -118,8 +119,8 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh) {
|
||||
hh->RangeEnd = hh->ContentLength - 1;
|
||||
const char *range = (hh->HeaderList["Range"] == "") ? NULL : hh->HeaderList["Range"].c_str();
|
||||
if ((range &&
|
||||
(2 != sscanf(range, "bytes=%lld-%lld", &hh->RangeStart, &hh->RangeEnd)) &&
|
||||
(1 != sscanf(range, "bytes=%lld-", &hh->RangeStart)))
|
||||
(2 != sscanf(range, "bytes=%" PRId64 "-%" PRId64, &hh->RangeStart, &hh->RangeEnd)) &&
|
||||
(1 != sscanf(range, "bytes=%" PRId64 "-", &hh->RangeStart)))
|
||||
|| (hh->RangeStart > hh->RangeEnd)
|
||||
|| (hh->RangeEnd > hh->ContentLength - 1)) {
|
||||
hh->SetError(HTTP_REQUEST_RANGE_NOT_SATISFIABLE);
|
||||
|
Reference in New Issue
Block a user