Chameleon

Chameleon Commit Details

Date:2011-10-22 12:02:23 (7 years 8 months ago)
Author:JrCs
Commit:1648
Parents: 1647
Message:Fix a little bug copyArgument: corrects the calculated length of the argument to add
Changes:
M/trunk/i386/boot2/options.c

File differences

trunk/i386/boot2/options.c
10711071
10721072
10731073
1074
1075
1076
10741077
10751078
10761079
......
10811084
10821085
10831086
1084
10851087
1088
10861089
10871090
10881091
int argLen = argName ? strlen(argName) : 0;
int len = argLen + cnt + 1; // +1 to account for space
if (argName)
len++; // +1 to account for '='
if (len > *cntRemainingP) {
error("Warning: boot arguments too long, truncating\n");
return false;
*argP += argLen;
*argP[0] = '=';
(*argP)++;
len++; // +1 to account for '='
}
strncpy( *argP, val, cnt );
*argP += cnt;
*argP[0] = ' ';

Archive Download the corresponding diff file

Revision: 1648