This is an automated email from the ASF dual-hosted git repository. marcoabreu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push: new 9f5c96e [MXNET-969] Fix buffer overflow in RNNOp (#12603) 9f5c96e is described below commit 9f5c96e3c686ec4979142eb80624cc3dc9326555 Author: Kellen Sunderland <kellen.sunderl...@gmail.com> AuthorDate: Fri Sep 21 10:19:23 2018 -0700 [MXNET-969] Fix buffer overflow in RNNOp (#12603) * [MXNET-969] Fix buffer overflow in RNNOp Co-authored-by: Sina Md <mds...@amazon.com> * [MXNET-969] Use ternary op for statecell --- src/operator/rnn-inl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/operator/rnn-inl.h b/src/operator/rnn-inl.h index 1f905ed..9211f6a 100644 --- a/src/operator/rnn-inl.h +++ b/src/operator/rnn-inl.h @@ -576,7 +576,8 @@ class RNNOp : public Operator{ req[rnn_enum::kData], req[rnn_enum::kParams], req[rnn_enum::kState], - req[rnn_enum::kStateCell], + // State cell should be present for LSTMs, but is absent for other RNNs. + param_.mode == rnn_enum::kLstm ? req[rnn_enum::kStateCell] : kNullOp, param_.p, param_.mode); }