state: check length
This ports the following barebox commit:

| commit 9271182
| Author: Jan Remmet <j.remmet@phytec.de>
| Date:   Thu May 23 09:49:00 2019 +0200
|
|     common: state: check length
|
|     if written_length is read from a partial written bucket it may be to
|     big and xmalloc will panic barebox.
|
|     Check if the value is sane. Make read_len unsigned to avoid negative
|     values.
|
|     Signed-off-by: Jan Remmet <j.remmet@phytec.de>
|     Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
1 parent b85142e commit a1fe3159ca2a4e1f1271ca15af162b66b5132d07
@Ulrich Ölmann Ulrich Ölmann authored on 30 Sep 2019
Roland Hieber committed on 11 Oct 2019
Showing 1 changed file
View
src/barebox-state/backend_bucket_direct.c