From 983300ecb3e5faa170dd939b31c8605ba9f4b136 Mon Sep 17 00:00:00 2001 From: ewt Date: Thu, 29 Oct 1998 16:33:04 +0000 Subject: [PATCH] their must be a { between two % in a query format (unless %% is used) CVS patchset: 2509 CVS date: 1998/10/29 16:33:04 --- CHANGES | 1 + lib/header.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index bd0088efe..30856b799 100644 --- a/CHANGES +++ b/CHANGES @@ -26,6 +26,7 @@ - generalize cpio I/O to eliminate pipe to exec'd gzip on install. - add {init,add,expand}Macro args everywhere (new macro.c compatibility) - add new fully recursive macro.c + - their must be a { between two % in a query format (unless %% is used) 2.5.5 -> 2.5.6: - fix off-by-1 alloca that prevented relocating /. diff --git a/lib/header.c b/lib/header.c index ab230f4eb..4050f5f42 100644 --- a/lib/header.c +++ b/lib/header.c @@ -1445,8 +1445,8 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags, format[currToken].u.tag.arrayCount = 0; chptr = start; - while (*chptr && *chptr != '{') chptr++; - if (!*chptr) { + while (*chptr && *chptr != '{' && *chptr != '%') chptr++; + if (!*chptr || *chptr == '%') { *error = _("missing { after %"); freeFormat(format, numTokens); return 1;