char* bin = Buffer;
do {
char* binStartNext = strchrnul(bin, ',');
- char* binEnd = binStartNext - 1;
- for (; isspace_ascii(*binEnd) != 0; --binEnd)
- binEnd = 0;
+ // Found a comma, clean up any space before it
+ if (binStartNext > Buffer) {
+ char* binEnd = binStartNext - 1;
+ for (; binEnd > Buffer && isspace_ascii(*binEnd) != 0; --binEnd)
+ *binEnd = 0;
+ }
StaticBinList.push_back(bin);
if (*binStartNext != ',')
break;
unsigned int I;
const char *Start, *Stop;
BuildDepRec rec;
- const char *fields[] = {"Build-Depends",
+ const char *fields[] = {"Build-Depends",
"Build-Depends-Indep",
"Build-Conflicts",
- "Build-Conflicts-Indep"};
+ "Build-Conflicts-Indep",
+ "Build-Depends-Arch",
+ "Build-Conflicts-Arch"};
BuildDeps.clear();
- for (I = 0; I < 4; I++)
+ for (I = 0; I < 6; I++)
{
if (ArchOnly && (I == 1 || I == 3))
continue;