svn commit: r327999 - stable/11/sys/ddb
Andriy Gapon
avg at FreeBSD.org
Mon Jan 15 12:14:30 UTC 2018
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;
More information about the svn-src-all
mailing list