diff options
author | markj <markj@FreeBSD.org> | 2017-08-30 02:08:34 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2017-08-30 02:08:34 +0000 |
commit | 388b3c70dece24f762f366219ce6a2872dd58c3f (patch) | |
tree | 5c167f63f2fb4688baa406b822af6d1e851d71ae /cddl/contrib/opensolaris/lib/libdtrace/common | |
parent | 9eba5d5cb4b651ab2868c60c111a5e3214072036 (diff) | |
download | FreeBSD-src-388b3c70dece24f762f366219ce6a2872dd58c3f.zip FreeBSD-src-388b3c70dece24f762f366219ce6a2872dd58c3f.tar.gz |
MFC r322773-r322775:
Fix an off-by-two in the llquantize() action parameter validation.
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c index 84f8661..495e225 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c @@ -1546,7 +1546,7 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) "divide a power of the factor\n"); } - for (i = 0, order = 1; i < args[2].value; i++) { + for (i = 0, order = 1; i <= args[2].value + 1; i++) { if (order * args[0].value > order) { order *= args[0].value; continue; @@ -1554,7 +1554,7 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) dnerror(dnp, D_LLQUANT_MAGTOOBIG, "llquantize( ) " "factor (%d) raised to power of high magnitude " - "(%d) overflows 64-bits\n", args[0].value, + "(%d) plus 1 overflows 64-bits\n", args[0].value, args[2].value); } |