File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 448448 \i tem \c ode{rbind()} now works correctly when inputs include a raw
449449 vector and a logical, integer or double vector -- previously the
450450 inclusion of the latter was garbled.
451- }
451+
452+ \i tem \c ode{smooth.spline()} checks validoity of its arguements
453+ \c ode{df.offset} and \c ode{penalty}: it could segfault if they
454+ were \c ode{NULL}.
455+ }
452456 }
453457}
454458
Original file line number Diff line number Diff line change @@ -166,6 +166,10 @@ smooth.spline <-
166166 # # icrit {../src/sslvrg.f}:
167167 # # (0 = no crit, 1 = GCV , 2 = ord.CV , 3 = df-matching)
168168 icrit <- if (is.na(cv )) 0L else if (cv ) 2L else 1L
169+ if (! is.numeric(df.offset ) || df.offset < 0 )
170+ stop(" df.offset must be numeric and >= 0" )
171+ if (! is.numeric(penalty ) || penalty < = 0 )
172+ stop(" penalty must be numeric and > 0" )
169173 dofoff <- df.offset
170174 if (! missing(df )) { # not when cv was NA
171175 if (df > 1 && df < = nx ) {
You can’t perform that action at this time.
0 commit comments