summaryrefslogtreecommitdiff
path: root/src/cbootimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cbootimage.c')
-rw-r--r--src/cbootimage.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cbootimage.c b/src/cbootimage.c
index ca781fa..e728c8b 100644
--- a/src/cbootimage.c
+++ b/src/cbootimage.c
@@ -239,7 +239,7 @@ main(int argc, char *argv[])
/* Get BCT_SIZE from input image file */
bct_size = get_bct_size_from_image(&context);
- if (bct_size < 0) {
+ if (bct_size <= 0) {
printf("Error: Invalid input image file %s\n",
context.input_image_filename);
goto fail;
@@ -301,6 +301,19 @@ main(int argc, char *argv[])
goto fail;
}
+ if (!context.bct_init) {
+ e = 1;
+ printf("No BCT file has been read or generated.\n");
+ printf("This is likely due to an incomplete config file.\n");
+ goto fail;
+ }
+ if (!context.memory) {
+ e = 1;
+ printf("No output data generated.\n");
+ printf("This is likely due to an incomplete config file.\n");
+ goto fail;
+ }
+
/* Peform final signing & encryption of bct. */
e = sign_bct(&context, context.bct);
if (e != 0) {