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.
This commit is contained in:
Andrew Rodland 2023-07-17 13:21:22 -04:00 committed by GitHub
parent fed79a7978
commit c5ad945c3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;