pkgsrc/databases/rrdtool/patches/patch-src_rrd__cgi.c
adam 56da83abef RRDtool 1.7.0
Bugfixes
--------
* made rrd_fetch_cb_wrapper in RRDs more careful with its arguments
* many bugfixes to resolve issues identified Coverty scan
* fix build issues with libdbl
* take the ds step into account while caching data in rrd graph DEF statements
* never 'exit' from librrd (even when DEBUG is on)

Features
--------
* new command rrd list to show rrd files in a directory
* configurable log-level for rrdcached
* hungarian translation (hu.po)

API
---
* New Exported funtions: rrd_lcd, rrd_reduce_data, rrd_cf_conf and rrd_list
* rrd_list support for perl and python binding
* all new and much more complete python bindings working on both python 2.6+ and 3.3+
* extended documentation in rrdlib.pod
2017-07-27 18:31:20 +00:00

30 lines
1.2 KiB
C

$NetBSD: patch-src_rrd__cgi.c,v 1.2 2017/07/27 18:31:20 adam Exp $
Use <ctype.h> correctly.
--- src/rrd_cgi.c.orig 2017-05-16 12:26:46.000000000 +0000
+++ src/rrd_cgi.c
@@ -1209,7 +1209,7 @@ static int parse(
return 0;
}
/* .. and match exactly (a whitespace following 'tag') */
- if (!isspace(*((*buf) + i + taglen))) {
+ if (!isspace((unsigned char) *((*buf) + i + taglen))) {
return 0;
}
#ifdef DEBUG_PARSER
@@ -1308,10 +1308,10 @@ static char *rrdcgiDecodeString(
if (*cp == '%') {
if (strchr("0123456789ABCDEFabcdef", *(cp + 1))
&& strchr("0123456789ABCDEFabcdef", *(cp + 2))) {
- if (islower(*(cp + 1)))
- *(cp + 1) = toupper(*(cp + 1));
- if (islower(*(cp + 2)))
- *(cp + 2) = toupper(*(cp + 2));
+ if (islower((unsigned char) *(cp + 1)))
+ *(cp + 1) = toupper((unsigned char) *(cp + 1));
+ if (islower((unsigned char) *(cp + 2)))
+ *(cp + 2) = toupper((unsigned char) *(cp + 2));
*(xp) =
(*(cp + 1) >=
'A' ? *(cp + 1) - 'A' + 10 : *(cp + 1) - '0') * 16 +