From: Marek Schimara Date: Fri, 17 Jun 2016 11:08:27 +0000 (+0200) Subject: src/rrd_xport.c: fix Coverity CID#13640 Array compared against 0 X-Git-Tag: v1.7.0~42^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4940b10d7d6c858e4623a436f71774885a158ea6;p=thirdparty%2Frrdtool-1.x.git src/rrd_xport.c: fix Coverity CID#13640 Array compared against 0 CWE-398 / https://cwe.mitre.org/data/definitions/398.html (im->gdes[i].legend == 0) doesn't make sense; im->gdes[i].legend declared as char legend[FMT_LEG_LEN + 5]; /* legend */ NOTE: fix to be checked to ensure it conserves the intended functionality. --- diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 55735186..59c46972 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -322,7 +322,7 @@ int rrd_xport_fn( return (-1); } - if (im->gdes[i].legend == 0) + if (im->gdes[i].legend[0] == '\0') legend_list[j][0] = '\0'; ++j; }