Fix an issue when setting an unaligned buffer where n is less than the difference of the rounded up pointer and the pointer. This was identified where n=1 was passed. n was decremented once, as expected, then decremented again after the while() evaluated to false. This resulted in a new n of 4GB. Change-Id: I862671bbe7efa8d370d0148e22ea55407e260053 Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/20655 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> |
||
|---|---|---|
| .. | ||
| 64bit_div.c | ||
| args.c | ||
| console.c | ||
| coreboot.c | ||
| ctype.c | ||
| die.c | ||
| exec.c | ||
| fmap.c | ||
| getopt_long.c | ||
| hexdump.c | ||
| ipchecksum.c | ||
| lib.c | ||
| libgcc.c | ||
| Makefile.inc | ||
| malloc.c | ||
| memory.c | ||
| printf.c | ||
| qsort.c | ||
| rand.c | ||
| readline.c | ||
| string.c | ||
| strlcpy.c | ||
| sysinfo.c | ||
| time.c | ||