Pino Toscano
2014-Jan-22 14:36 UTC
[Libguestfs] [PATCH] builder: fix small regression in subkey parsing
Introduced in 5cbdf35d651b6c730d62d9af4876039faa122efc, it caused the first character of the value to be skipped if the key has a subkey. --- builder/index-scan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/index-scan.l b/builder/index-scan.l index 7a9618f..e43f82e 100644 --- a/builder/index-scan.l +++ b/builder/index-scan.l @@ -65,7 +65,7 @@ extern void yyerror (const char *); if (yytext[i] == '[') { size_t j = strcspn (yytext+i+1, "]"); yylval.field->subkey = strndup (yytext+i+1, j); - i += 1+j+2; + i += 1+j+1; } else { yylval.field->subkey = NULL; } -- 1.8.3.1
Richard W.M. Jones
2014-Jan-22 15:34 UTC
Re: [Libguestfs] [PATCH] builder: fix small regression in subkey parsing
On Wed, Jan 22, 2014 at 03:36:03PM +0100, Pino Toscano wrote:> Introduced in 5cbdf35d651b6c730d62d9af4876039faa122efc, it caused the > first character of the value to be skipped if the key has a subkey. > --- > builder/index-scan.l | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/builder/index-scan.l b/builder/index-scan.l > index 7a9618f..e43f82e 100644 > --- a/builder/index-scan.l > +++ b/builder/index-scan.l > @@ -65,7 +65,7 @@ extern void yyerror (const char *); > if (yytext[i] == '[') { > size_t j = strcspn (yytext+i+1, "]"); > yylval.field->subkey = strndup (yytext+i+1, j); > - i += 1+j+2; > + i += 1+j+1; > } else { > yylval.field->subkey = NULL; > } > -- > 1.8.3.1ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Possibly Parallel Threads
- Re: [PATCH] builder: proper consider subkeys in index files
- [PATCH] builder: proper consider subkeys in index files
- [PATCH 1/3] builder: make the C index parser reentrant
- [PATCH] builder: proper consider subkeys in index files
- [PATCH] builder: ignore spaces after repo identifiers (RHBZ#1506511)