Date: Mon, 15 Jan 2018 12:15:05 +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-10@freebsd.org Subject: svn commit: r328000 - stable/10/sys/ddb Message-ID: <201801151215.w0FCF5rP031753@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Jan 15 12:15:04 2018 New Revision: 328000 URL: https://svnweb.freebsd.org/changeset/base/328000 Log: MFC r326567: ddb: fix validation of cpu id in 'set db_cpu=x' Modified: stable/10/sys/ddb/db_sym.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ddb/db_sym.c ============================================================================== --- stable/10/sys/ddb/db_sym.c Mon Jan 15 12:14:28 2018 (r327999) +++ stable/10/sys/ddb/db_sym.c Mon Jan 15 12:15:04 2018 (r328000) @@ -81,8 +81,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?201801151215.w0FCF5rP031753>