Author: ngie Date: Tue Dec 22 05:57:23 2015 New Revision: 292585 URL: https://svnweb.freebsd.org/changeset/base/292585
Log: Prevent use-after-free with ctx->ns in set_nameservers(..), which could occur if the memory wasn't allocated again later on Reported by: Coverity Submitted by: Miles Ohlrich <miles.ohlr...@isilon.com> MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/uhsoctl/uhsoctl.c Modified: head/usr.sbin/uhsoctl/uhsoctl.c ============================================================================== --- head/usr.sbin/uhsoctl/uhsoctl.c Tue Dec 22 03:07:38 2015 (r292584) +++ head/usr.sbin/uhsoctl/uhsoctl.c Tue Dec 22 05:57:23 2015 (r292585) @@ -452,6 +452,7 @@ set_nameservers(struct ctx *ctx, const c free(ctx->ns[i]); } free(ctx->ns); + ctx->ns = NULL; } fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW, 0666); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"