diff options
author | Dave Heller <hellerda@us.ibm.com> | 2017-08-26 01:54:55 -0400 |
---|---|---|
committer | Dave Heller <hellerda@us.ibm.com> | 2017-08-26 01:54:55 -0400 |
commit | e807aeee19556974c5041aa862eac70c49a14b8f (patch) | |
tree | 201758e7023a39e84f706085eafba90bd5ea7412 /container.c | |
parent | d7b60cac979d94cda2022a2a7921898295d61139 (diff) | |
download | sb-signing-utils-e807aeee19556974c5041aa862eac70c49a14b8f.tar.gz sb-signing-utils-e807aeee19556974c5041aa862eac70c49a14b8f.zip |
Add support for input of signatures in RAW format to create-container.c
Signed-off-by: Dave Heller <hellerda@us.ibm.com>
Diffstat (limited to 'container.c')
-rw-r--r-- | container.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/container.c b/container.c index ceaa979..bb26deb 100644 --- a/container.c +++ b/container.c @@ -89,7 +89,7 @@ int isValidHex(char *input, int len) { char multiplier[8]; bool result = false; - if (strnlen(input, maxlen) >= maxlen) + if ((strnlen(input, maxlen) > maxlen * 2) || (len > (int) maxlen)) die(EX_DATAERR, "input exceeded max length: %lu", maxlen); if (len > 0) @@ -123,7 +123,7 @@ int isValidAscii(char *input, int len) { char multiplier[8]; bool result = false; - if (strnlen(input, maxlen) >= maxlen) + if ((strnlen(input, maxlen) > maxlen) || (len > (int) maxlen)) die(EX_DATAERR, "input exceeded max length: %lu", maxlen); if (len > 0) |