@cryptotaxi247 / netdata-1 / commits / ed59e9b7f

prevent conditional jump based on uninitialized value

Costa Tsaousis (ktsaou) committed Sep 5, 2017 at 23:27 UTC ed59e9b7f682e78b16bfd3697de5a5e8cacc4896
1 file changed +1 -1
src/storage_number.c
+1 -1
@@ -210,7 +210,7 @@ int print_calculated_number(char *str, calculated_number value) {
210 }
211
212 char *begin = fractional_str;
213 - while(*begin == '0' && begin < fstre) begin++;
213 + while(begin < fstre && *begin == '0') begin++;
214
215 // copy reversed the fractional string
216 fstre--;