- Fix contrib/fastrpz.patch asprintf return value checks.

This commit is contained in:
W.C.A. Wijngaards 2019-08-23 08:41:46 +02:00
parent 79fa94834e
commit a374dfb669
2 changed files with 7 additions and 4 deletions

View file

@ -3264,8 +3264,8 @@ index 10227a2f..a519fcc7 100644
+
+ OUTYY(("P(rpz_zone:%s)\n", $2));
+ old_cstr = cfg_parser->cfg->rpz_cstr;
+ (void)asprintf(&new_cstr, "%s\nzone %s", old_cstr?old_cstr:"", $2);
+ if(!new_cstr)
+ if(asprintf(&new_cstr, "%s\nzone %s", old_cstr?old_cstr:"", $2) == -1) {new_cstr = NULL; yyerror("out of memory");}
+ else if(!new_cstr)
+ yyerror("out of memory");
+ free(old_cstr);
+ cfg_parser->cfg->rpz_cstr = new_cstr;
@ -3277,8 +3277,8 @@ index 10227a2f..a519fcc7 100644
+
+ OUTYY(("P(rpz_option:%s)\n", $2));
+ old_cstr = cfg_parser->cfg->rpz_cstr;
+ (void)asprintf(&new_cstr, "%s\n%s", old_cstr ? old_cstr : "", $2);
+ if(!new_cstr)
+ if(asprintf(&new_cstr, "%s\n%s", old_cstr ? old_cstr : "", $2) == -1) {new_cstr = NULL; yyerror("out of memory");}
+ else if(!new_cstr)
+ yyerror("out of memory");
+ free(old_cstr);
+ cfg_parser->cfg->rpz_cstr = new_cstr;

View file

@ -1,3 +1,6 @@
23 August 2019: Wouter
- Fix contrib/fastrpz.patch asprintf return value checks.
22 August 2019: Wouter
- Fix that pkg-config is setup before --enable-systemd needs it.
- 1.9.3rc2 release candidate tag.