bloblist: Correct condition in bloblist_addrec()
It is possible to add a blob that ends at the end of the bloblist, but at present this is not supported. Fix it and add a regression test for this case. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -118,7 +118,7 @@ static int bloblist_addrec(uint tag, int size, int align,
|
||||
/* Calculate the new allocated total */
|
||||
new_alloced = data_start + ALIGN(size, align);
|
||||
|
||||
if (new_alloced >= hdr->size) {
|
||||
if (new_alloced > hdr->size) {
|
||||
log(LOGC_BLOBLIST, LOGL_ERR,
|
||||
"Failed to allocate %x bytes size=%x, need size=%x\n",
|
||||
size, hdr->size, new_alloced);
|
||||
|
||||
Reference in New Issue
Block a user