shithub: dumb

Download patch

ref: 143ac6b1311c738587defa65016358fa71be0e31
parent: 5b36c39238d02c7f1fa8df791ae54935830300ca
author: Andrew Thompson <andrew@hijacked.us>
date: Wed May 7 20:02:39 EDT 2014

Fix 2 places valgrind warns about unintialized memory being used

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -328,6 +328,8 @@
 	dst->time_left = src->time_left;
 	dst->sub_time_left = src->sub_time_left;
 
+	dst->ramp_style = src->ramp_style;
+
 	dst->click_remover = NULL;
 
 	dst->callbacks = callbacks;
--- a/dumb/src/it/readpsm.c
+++ b/dumb/src/it/readpsm.c
@@ -930,8 +930,10 @@
 
 	sigdata->sample = malloc(sigdata->n_samples * sizeof(*sigdata->sample));
 	if (!sigdata->sample) goto error_ev;
-	for (n = 0; n < sigdata->n_samples; n++)
+	for (n = 0; n < sigdata->n_samples; n++) {
 		sigdata->sample[n].data = NULL;
+		sigdata->sample[n].flags = 0;
+	}
 
 	o = 0;
 	for (n = 0; n < n_chunks; n++) {