Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
[MXNET-969] Fix buffer overflow in RNNOp (v1.3.x) (#13119)
Browse files Browse the repository at this point in the history
* [MXNET-969] Fix buffer overflow in RNNOp

Co-authored-by: Sina Md <mdsina@amazon.com>

* [MXNET-969] Use ternary op for statecell
  • Loading branch information
lebeg authored and szha committed Nov 7, 2018
1 parent a21a88e commit 7f3b7b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/operator/rnn-inl.h
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7f3b7b8

Please sign in to comment.