reports.c: generateHTML_SRPMSFiles: fix a segfault when writing multiple providers

This commit is contained in:
Silvan Calarco 2020-06-25 16:31:06 +02:00
parent 374df0a529
commit 160acba232

View File

@ -1194,6 +1194,7 @@ generateHTML_SRPMSFiles(struct configTag *configtag)
} else { } else {
// multiple providers // multiple providers
if (i == 0 || if (i == 0 ||
!currheadersourcelist->require[i-1]->resolved ||
strcmp(currheadersourcelist->require[i-1]->resolved->name, strcmp(currheadersourcelist->require[i-1]->resolved->name,
currheadersourcelist->require[i]->resolved->name)) currheadersourcelist->require[i]->resolved->name))
fprintf(fout,"<i>%s</i>(",currheadersourcelist->require[i]->resolved->name); fprintf(fout,"<i>%s</i>(",currheadersourcelist->require[i]->resolved->name);