summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/process.c b/process.c
index 148f14b..43f10e0 100644
--- a/process.c
+++ b/process.c
@@ -1614,7 +1614,7 @@ do_add(const char *inputfilename, int lineno, int argc, const char **argv)
hexkey = argv[3];
len = strlen(hexkey);
- if (hexkey[0] == '"' && hexkey[len-1] == '"') {
+ if (len > 1 && hexkey[0] == '"' && hexkey[len-1] == '"') {
key = malloc(len-1);
strncpy(key, hexkey+1, len-2);
len -= 2;