]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: json-parser - Fix error message for invalid escape sequence
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 6 May 2020 10:01:41 +0000 (13:01 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 7 Oct 2020 13:57:27 +0000 (13:57 +0000)
src/lib/json-parser.c

index 97b86c5ce27edd078021264f705d2b481f7c1b56..add5c42ec0c47c261768ec20a7ea7e48064dbc7c 100644 (file)
@@ -199,6 +199,7 @@ static int json_skip_string(struct json_parser *parser)
                                parser->data += 3;
                                break;
                        default:
+                               parser->error = "Invalid escape string";
                                return -1;
                        }
                }
@@ -332,6 +333,7 @@ static int json_parse_string(struct json_parser *parser, bool allow_skip,
                                        return ret;
                                break;
                        default:
+                               parser->error = "Invalid escape string";
                                return -1;
                        }
                        break;