summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/checkpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checkpoint.c b/src/checkpoint.c
index eb12c1c0..9d4895cc 100644
--- a/src/checkpoint.c
+++ b/src/checkpoint.c
@@ -84,7 +84,7 @@ copy_string_unquote (const char *str)
char *output = xstrdup (str);
size_t len = strlen (output);
if ((*output == '"' || *output == '\'')
- && output[len-1] == *output)
+ && len > 1 && output[len-1] == *output)
{
memmove (output, output+1, len-2);
output[len-2] = 0;