From: W.C.A. Wijngaards Date: Fri, 23 Aug 2019 06:41:46 +0000 (+0200) Subject: - Fix contrib/fastrpz.patch asprintf return value checks. X-Git-Tag: release-1.9.6rc1~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a374dfb669b704f183fbc43cf747fab069b80764;p=thirdparty%2Funbound.git - Fix contrib/fastrpz.patch asprintf return value checks. --- diff --git a/contrib/fastrpz.patch b/contrib/fastrpz.patch index d82226a25..3b1b07885 100644 --- a/contrib/fastrpz.patch +++ b/contrib/fastrpz.patch @@ -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; diff --git a/doc/Changelog b/doc/Changelog index e4bb71923..fd139cb0f 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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.