busybox: apply newer fix for #331

This commit is contained in:
Dylan Araps 2021-09-10 21:29:42 +03:00
parent 1873c7d5d0
commit 7623e60ab7
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
3 changed files with 24 additions and 14 deletions

View File

@ -7,7 +7,7 @@ f0e17fefc0af6b10205d72b242b6ef7481a58ff07726c62890ebc5893b96a396
73be7b16dcff44e88eb48696522794f529beddf9d5a139b8a76cc8685a9f6fc8 73be7b16dcff44e88eb48696522794f529beddf9d5a139b8a76cc8685a9f6fc8
d70c4cd6381baeb3836c0387f53553021b48bdc851de49f1c86d836f7d0355fc d70c4cd6381baeb3836c0387f53553021b48bdc851de49f1c86d836f7d0355fc
b030d6ac2b3284cf3cc0a2eec886d26b7e09ea59feb460a6a09165da62a582b4 b030d6ac2b3284cf3cc0a2eec886d26b7e09ea59feb460a6a09165da62a582b4
fc5e47e82765dc43c0b271156d40cf80148fb67b55c935e6f61a0e052ba49e40 48ed5f360cad111e8fe17c8eea8e65d1d54b96209e9a5a73835ae6681aeb2355
c8a6fc95a75fa355d570c14e214d68a618e060a486b824b83b5140b9c6a894a7 c8a6fc95a75fa355d570c14e214d68a618e060a486b824b83b5140b9c6a894a7
5f3d6cbdc7060deab644555201365e6dd15ffed07d341532c3d82a170e95c0bd 5f3d6cbdc7060deab644555201365e6dd15ffed07d341532c3d82a170e95c0bd
423c3a67ad56b290ef73440cb748dbc3c6ee2ec486683b5e19242a804db8085b 423c3a67ad56b290ef73440cb748dbc3c6ee2ec486683b5e19242a804db8085b

View File

@ -1,21 +1,31 @@
diff --git a/editors/awk.c b/editors/awk.c diff --git a/editors/awk.c b/editors/awk.c
index 3adbca7..f7b8ef0 100644 index 3adbca7..02c26d7 100644
--- a/editors/awk.c --- a/editors/awk.c
+++ b/editors/awk.c +++ b/editors/awk.c
@@ -2346,8 +2346,15 @@ static char *awk_printf(node *n, size_t *len) @@ -2346,12 +2346,21 @@ static char *awk_printf(node *n, size_t *len)
size_t slen; size_t slen;
s = f; s = f;
- while (*f && (*f != '%' || *++f == '%')) - while (*f && (*f != '%' || *++f == '%'))
- f++;
- while (*f && !isalpha(*f)) {
- if (*f == '*')
- syntax_error("%*x formats are not supported");
+ while (*f && *f != '%') + while (*f && *f != '%')
f++; f++;
+ c = *++f; + if (*f) {
+ if (c == '%') { /* double % */ + c = *++f;
+ slen = f - s; + if (c == '%') { /* double % */
+ s = xstrndup(s, slen); + slen = f - s;
+ f++; + s = xstrndup(s, slen);
+ goto tail; + f++;
+ } + goto tail;
while (*f && !isalpha(*f)) { + }
if (*f == '*') + while (*f && !isalpha(*f)) {
syntax_error("%*x formats are not supported"); + if (*f == '*')
+ syntax_error("%*x formats are not supported");
+ f++;
+ }
}
c = *f;
if (!c) {

View File

@ -1 +1 @@
1.34.0 5 1.34.0 6