Fixed false positive in suspicous user agent

Optimized stddev calculation
This commit is contained in:
Luca Deri
2020-08-30 12:25:15 +02:00
parent 8bf95b6198
commit dd75060932
74 changed files with 284 additions and 272 deletions
+2 -3
View File
@@ -1505,11 +1505,10 @@ typedef struct {
struct ndpi_analyze_struct {
u_int32_t *values;
u_int32_t min_val, max_val, sum_total, num_data_entries, next_value_insert_index;
u_int16_t num_values_array_len /* lenght of the values array */;
u_int16_t num_values_array_len /* length of the values array */;
struct {
/* https://www.johndcook.com/blog/standard_deviation/ */
float mu, q;
u_int64_t sum_square_total;
} stddev;
};