projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c47f8da
)
PQF parsing: handle \\\0 sequence
author
Adam Dickmeiss
<adam@indexdata.dk>
Sat, 27 Aug 2011 22:07:48 +0000
(
00:07
+0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sat, 27 Aug 2011 22:07:48 +0000
(
00:07
+0200)
A truncated PQF term, backslash as last character, would resolve in
read one byte beyond end of string.
src/pquery.c
patch
|
blob
|
history
diff --git
a/src/pquery.c
b/src/pquery.c
index
a0fde12
..
749ce02
100644
(file)
--- 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);