If the line is made solely of whitespaces, they get removed and we end up with len set to -1. Therefore we need an additional check to avoid dereferencing line[-1].
@@ -423,7 +423,7 @@ dictionary *ciniparser_load(const char *ininame)
}
/* Detect multi-line */
- if (line[len] == '\\') {
+ if (len >= 0 && line[len] == '\\') {
/* Multi-line value */
last = len;
continue;