iris: Don't enable smooth points when point sprites are enabled
[mesa.git] / src / gallium / auxiliary / hud / hud_cpufreq.c
index f5b7c0f2eb490bf8c89ef0600401dfba3c1e4a5e..d3cf2019c38e632bf2b407eee180c7b37c302ed0 100644 (file)
@@ -91,7 +91,7 @@ get_file_value(const char *fn, uint64_t *KHz)
 }
 
 static void
-query_cfi_load(struct hud_graph *gr)
+query_cfi_load(struct hud_graph *gr, struct pipe_context *pipe)
 {
    struct cpufreq_info *cfi = gr->query_data;
 
@@ -207,8 +207,12 @@ hud_get_num_cpufreq(bool displayhelp)
 
    while ((dp = readdir(dir)) != NULL) {
 
-      /* Avoid 'lo' and '..' and '.' */
-      if (strlen(dp->d_name) <= 2)
+      size_t d_name_len = strlen(dp->d_name);
+
+      /* Avoid 'lo' and '..' and '.', and avoid overlong names that
+       * would  result in a buffer overflow in add_object.
+       */
+      if (d_name_len <= 2 || d_name_len > 15)
          continue;
 
       if (sscanf(dp->d_name, "cpu%d\n", &cpu_index) != 1)