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 (#12603)
Browse files Browse the repository at this point in the history
* [MXNET-969] Fix buffer overflow in RNNOp

Co-authored-by: Sina Md <[email protected]>

* [MXNET-969] Use ternary op for statecell
  • Loading branch information
KellenSunderland authored and marcoabreu committed Sep 21, 2018
1 parent cb6815c commit 9f5c96e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/operator/rnn-inl.h
Original file line number Diff line number Diff line change
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 9f5c96e

Please sign in to comment.