From: Harlan Stenn Date: Tue, 12 Aug 2014 06:01:01 +0000 (-0400) Subject: [Bug 2630] Limit the ntpq command buffer to 512 bytes X-Git-Tag: NTP_4_2_7P459~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=633cca4a3186129cd4b6e9e86b9e98a813db6bc6;p=thirdparty%2Fntp.git [Bug 2630] Limit the ntpq command buffer to 512 bytes bk: 53e9ad9dFUpUNBw9GO11eh_pi_R6Mw --- diff --git a/ChangeLog b/ChangeLog index 8667c820a..fd0d4b9b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 2630] Limit the ntpq command buffer to 512 bytes. * FlexeLint cleanups. (4.2.7p458) 2014/08/11 Released by Harlan Stenn * [Bug 2633] Provide stdnoreturn.h for windows port. diff --git a/ntpq/invoke-ntpq.texi b/ntpq/invoke-ntpq.texi index ebabd8454..399820aab 100644 --- a/ntpq/invoke-ntpq.texi +++ b/ntpq/invoke-ntpq.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi) # -# It has been AutoGen-ed +# It has been AutoGen-ed August 12, 2014 at 12:01:59 AM by AutoGen 5.18.4pre14 # From the definitions ntpq-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -778,7 +778,7 @@ Usage: ntpq [ - [] | --[@{=| @}] ]... [ host ...] -6 no ipv6 Force IPv6 DNS name resolution - prohibits the option 'ipv4' -c Str command run a command and exit - - may appear multiple times + - may appear up to 512 times -d no debug-level Increase debug verbosity level - may appear multiple times -D Num set-debug-level Set the debug verbosity level @@ -856,7 +856,7 @@ This option takes a string argument @file{cmd}. This option has some usage constraints. It: @itemize @bullet @item -may appear an unlimited number of times. +may appear up to 512 times. @end itemize The following argument is interpreted as an interactive format command diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c index bd8585a2c..2f9576dab 100644 --- a/ntpq/ntpq-opts.c +++ b/ntpq/ntpq-opts.c @@ -369,7 +369,7 @@ static tOptDesc optDesc[OPTION_CT] = { { /* entry idx, value */ 2, VALUE_OPT_COMMAND, /* equiv idx, value */ 2, VALUE_OPT_COMMAND, /* equivalenced to */ NO_EQUIVALENT, - /* min, max, act ct */ 0, NOLIMIT, 0, + /* min, max, act ct */ 0, 512, 0, /* opt state flags */ COMMAND_FLAGS, 0, /* last opt argumnt */ { NULL }, /* --command */ /* arg list/cookie */ NULL, diff --git a/ntpq/ntpq-opts.def b/ntpq/ntpq-opts.def index ca72458a6..3028b6d2c 100644 --- a/ntpq/ntpq-opts.def +++ b/ntpq/ntpq-opts.def @@ -39,7 +39,7 @@ flag = { value = c; arg-type = string; descrip = "run a command and exit"; - max = NOLIMIT; + max = 512; arg-name = cmd; call-proc = ntpq_custom_opt_handler; doc = <<- _EndOfDoc_ diff --git a/ntpq/ntpq.1ntpqman b/ntpq/ntpq.1ntpqman index 79d1024e7..d101640e9 100644 --- a/ntpq/ntpq.1ntpqman +++ b/ntpq/ntpq.1ntpqman @@ -10,9 +10,9 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpq 1ntpqman "11 Aug 2014" "4.2.7p458" "User Commands" +.TH ntpq 1ntpqman "12 Aug 2014" "4.2.7p458" "User Commands" .\" -.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-KLaq8Y/ag-WLaq7Y) +.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-eqaqdV/ag-qqaqcV) .\" .\" It has been AutoGen-ed .\" From the definitions ntpq-opts.def @@ -1172,7 +1172,7 @@ to the IPv6 namespace. .TP .NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[] run a command and exit. -This option may appear an unlimited number of times. +This option may appear up to 512 times. .sp The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified @@ -1260,9 +1260,9 @@ the configuration files. The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". If any of these are directories, then the file \fI.ntprc\fP is searched for within those directories. -.TH ntpq 1ntpqman "11 Aug 2014" "4.2.7p458" "User Commands" +.TH ntpq 1ntpqman "12 Aug 2014" "4.2.7p458" "User Commands" .\" -.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-KLaq8Y/ag-WLaq7Y) +.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-eqaqdV/ag-qqaqcV) .\" .\" It has been AutoGen-ed .\" From the definitions ntpq-opts.def diff --git a/ntpq/ntpq.1ntpqmdoc b/ntpq/ntpq.1ntpqmdoc index 5a5100902..8dc6ff32e 100644 --- a/ntpq/ntpq.1ntpqmdoc +++ b/ntpq/ntpq.1ntpqmdoc @@ -1,4 +1,4 @@ -.Dd August 11 2014 +.Dd August 12 2014 .Dt NTPQ 1ntpqmdoc User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) @@ -759,7 +759,7 @@ Force DNS resolution of following host names on the command line to the IPv6 namespace. .It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd run a command and exit. -This option may appear an unlimited number of times. +This option may appear up to 512 times. .sp The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified diff --git a/ntpq/ntpq.man.in b/ntpq/ntpq.man.in index 430d5a491..a4c89ecc5 100644 --- a/ntpq/ntpq.man.in +++ b/ntpq/ntpq.man.in @@ -10,9 +10,9 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpq @NTPQ_MS@ "11 Aug 2014" "4.2.7p458" "User Commands" +.TH ntpq @NTPQ_MS@ "12 Aug 2014" "4.2.7p458" "User Commands" .\" -.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-KLaq8Y/ag-WLaq7Y) +.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-eqaqdV/ag-qqaqcV) .\" .\" It has been AutoGen-ed .\" From the definitions ntpq-opts.def @@ -1172,7 +1172,7 @@ to the IPv6 namespace. .TP .NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[] run a command and exit. -This option may appear an unlimited number of times. +This option may appear up to 512 times. .sp The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified @@ -1260,9 +1260,9 @@ the configuration files. The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". If any of these are directories, then the file \fI.ntprc\fP is searched for within those directories. -.TH ntpq @NTPQ_MS@ "11 Aug 2014" "4.2.7p458" "User Commands" +.TH ntpq @NTPQ_MS@ "12 Aug 2014" "4.2.7p458" "User Commands" .\" -.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-KLaq8Y/ag-WLaq7Y) +.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-eqaqdV/ag-qqaqcV) .\" .\" It has been AutoGen-ed .\" From the definitions ntpq-opts.def diff --git a/ntpq/ntpq.mdoc.in b/ntpq/ntpq.mdoc.in index bc603ec18..6342d22ed 100644 --- a/ntpq/ntpq.mdoc.in +++ b/ntpq/ntpq.mdoc.in @@ -1,4 +1,4 @@ -.Dd August 11 2014 +.Dd August 12 2014 .Dt NTPQ @NTPQ_MS@ User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) @@ -759,7 +759,7 @@ Force DNS resolution of following host names on the command line to the IPv6 namespace. .It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd run a command and exit. -This option may appear an unlimited number of times. +This option may appear up to 512 times. .sp The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified