summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.c b/util.c
index 319a870..a6ca094 100644
--- a/util.c
+++ b/util.c
@@ -168,9 +168,13 @@ ReadDERFromFile(SECItem *** derlist, char *filename, PRBool ascii,
key = 1;
c = body;
body = strchr(body, '\n');
+ if (NULL == body)
+ goto loser;
body++;
if (strncmp(body, "Proc-Type: 4,ENCRYPTED", 22) == 0) {
body = strchr(body, '\n');
+ if (NULL == body)
+ goto loser;
body++;
if (strncmp(body, "DEK-Info: ", 10) == 0) {
body += 10;