Ver Fonte

stats: Assert value_len when value is needed

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse há 6 anos atrás
pai
commit
624b6a4707
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      exec/stats.c

+ 2 - 0
exec/stats.c

@@ -233,6 +233,8 @@ static void stats_map_set_value(struct cs_stats_conv *conv,
 		}
 	}
 	if (value) {
+		assert(value_len != NULL);
+
 		memcpy(value, (char *)(stat_array) + conv->offset, *value_len);
 	}
 }