diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-09-25 10:44:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-25 10:44:02 +0000 |
commit | e368d4c50daa24e227c5321bf70c43234f4ed229 (patch) | |
tree | 1f534fe5f8c07b3da96a14341988bd4631cd0815 | |
parent | b8653470b9a5934a7632e5cd1fa519646f389cc7 (diff) | |
parent | aa52d5ba4b5f770367bb34cae64f74f986944596 (diff) | |
download | genimage-e368d4c50daa24e227c5321bf70c43234f4ed229.tar.gz genimage-e368d4c50daa24e227c5321bf70c43234f4ed229.tar.xz |
Merge pull request #75 from michaelolbrich/ubifs
image-ubifs: validate lebsize
-rw-r--r-- | image-ubifs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/image-ubifs.c b/image-ubifs.c index 79ff2ca..b07628f 100644 --- a/image-ubifs.c +++ b/image-ubifs.c @@ -54,6 +54,11 @@ static int ubifs_setup(struct image *image, cfg_t *cfg) image_error(image, "no flash type given\n"); return -EINVAL; } + if (image->flash_type->lebsize <= 0) { + image_error(image, "invalid lebsize (%d) in %s\n", + image->flash_type->lebsize, image->flash_type->name); + return -EINVAL; + } return 0; } |