Date: Mon, 15 Jan 2018 12:14:29 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327999 - stable/11/sys/ddb Message-ID: <201801151214.w0FCETOR031658@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Jan 15 12:14:28 2018 New Revision: 327999 URL: https://svnweb.freebsd.org/changeset/base/327999 Log: MFC r326567: ddb: fix validation of cpu id in 'set db_cpu=x' Modified: stable/11/sys/ddb/db_sym.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ddb/db_sym.c ============================================================================== --- stable/11/sys/ddb/db_sym.c Mon Jan 15 12:00:34 2018 (r327998) +++ stable/11/sys/ddb/db_sym.c Mon Jan 15 12:14:28 2018 (r327999) @@ -83,8 +83,8 @@ db_var_db_cpu(struct db_variable *vp, db_expr_t *value return (1); case DB_VAR_SET: - if (*(int *)valuep < -1 && *(int *)valuep > mp_maxid) { - db_printf("Invalid value: %d", *(int*)valuep); + if (*(int *)valuep < -1 || *(int *)valuep > mp_maxid) { + db_printf("Invalid value: %d\n", *(int*)valuep); return (0); } db_cpu = *(int *)valuep;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801151214.w0FCETOR031658>