mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix contrib/fastrpz.patch asprintf return value checks.
This commit is contained in:
parent
79fa94834e
commit
a374dfb669
2 changed files with 7 additions and 4 deletions
|
|
@ -3264,8 +3264,8 @@ index 10227a2f..a519fcc7 100644
|
||||||
+
|
+
|
||||||
+ OUTYY(("P(rpz_zone:%s)\n", $2));
|
+ OUTYY(("P(rpz_zone:%s)\n", $2));
|
||||||
+ old_cstr = cfg_parser->cfg->rpz_cstr;
|
+ old_cstr = cfg_parser->cfg->rpz_cstr;
|
||||||
+ (void)asprintf(&new_cstr, "%s\nzone %s", old_cstr?old_cstr:"", $2);
|
+ if(asprintf(&new_cstr, "%s\nzone %s", old_cstr?old_cstr:"", $2) == -1) {new_cstr = NULL; yyerror("out of memory");}
|
||||||
+ if(!new_cstr)
|
+ else if(!new_cstr)
|
||||||
+ yyerror("out of memory");
|
+ yyerror("out of memory");
|
||||||
+ free(old_cstr);
|
+ free(old_cstr);
|
||||||
+ cfg_parser->cfg->rpz_cstr = new_cstr;
|
+ cfg_parser->cfg->rpz_cstr = new_cstr;
|
||||||
|
|
@ -3277,8 +3277,8 @@ index 10227a2f..a519fcc7 100644
|
||||||
+
|
+
|
||||||
+ OUTYY(("P(rpz_option:%s)\n", $2));
|
+ OUTYY(("P(rpz_option:%s)\n", $2));
|
||||||
+ old_cstr = cfg_parser->cfg->rpz_cstr;
|
+ old_cstr = cfg_parser->cfg->rpz_cstr;
|
||||||
+ (void)asprintf(&new_cstr, "%s\n%s", old_cstr ? old_cstr : "", $2);
|
+ if(asprintf(&new_cstr, "%s\n%s", old_cstr ? old_cstr : "", $2) == -1) {new_cstr = NULL; yyerror("out of memory");}
|
||||||
+ if(!new_cstr)
|
+ else if(!new_cstr)
|
||||||
+ yyerror("out of memory");
|
+ yyerror("out of memory");
|
||||||
+ free(old_cstr);
|
+ free(old_cstr);
|
||||||
+ cfg_parser->cfg->rpz_cstr = new_cstr;
|
+ cfg_parser->cfg->rpz_cstr = new_cstr;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
23 August 2019: Wouter
|
||||||
|
- Fix contrib/fastrpz.patch asprintf return value checks.
|
||||||
|
|
||||||
22 August 2019: Wouter
|
22 August 2019: Wouter
|
||||||
- Fix that pkg-config is setup before --enable-systemd needs it.
|
- Fix that pkg-config is setup before --enable-systemd needs it.
|
||||||
- 1.9.3rc2 release candidate tag.
|
- 1.9.3rc2 release candidate tag.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue