From: Adam Dickmeiss Date: Sat, 27 Aug 2011 22:07:48 +0000 (+0200) Subject: PQF parsing: handle \\\0 sequence X-Git-Tag: v4.2.13~14 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=cf4a74a0d6b17bf1c6582835a7fceaec7ad4115d;p=yaz-moved-to-github.git PQF parsing: handle \\\0 sequence A truncated PQF term, backslash as last character, would resolve in read one byte beyond end of string. --- diff --git a/src/pquery.c b/src/pquery.c index a0fde12..749ce02 100644 --- a/src/pquery.c +++ b/src/pquery.c @@ -84,7 +84,7 @@ static int query_token(struct yaz_pqf_parser *li) } while (**qptr && **qptr != sep_char) { - if (**qptr == '\\') + if (**qptr == '\\' && (*qptr)[1]) { ++(li->lex_len); ++(*qptr);