From c5ad945c3c15a65ecbe208b76b469edcd6e39cb7 Mon Sep 17 00:00:00 2001 From: Andrew Rodland Date: Mon, 17 Jul 2023 13:21:22 -0400 Subject: [PATCH] Fix IL2PTX config parsing (#483) We were checking `*t` for end of string instead of `*c`, but `t` never changes, so we would run off of the end of the buffer and output a very large number of config errors before eventually crashing. --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index de84b04..f3edc15 100644 --- a/src/config.c +++ b/src/config.c @@ -2380,7 +2380,7 @@ void config_init (char *fname, struct audio_s *p_audio_config, p_audio_config->achan[channel].il2p_invert_polarity = 0; while ((t = split(NULL,0)) != NULL) { - for (char *c = t; *t != '\0'; c++) { + for (char *c = t; *c != '\0'; c++) { switch (*c) { case '+': p_audio_config->achan[channel].il2p_invert_polarity = 0;