Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix a shape inference issue leading to nullptr deref.
PiperOrigin-RevId: 387712259
Change-Id: I7e670772b259c068a501a187cd89f18773bb95a1
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed Jul 30, 2021
1 parent 8a793b5 commit da857cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tensorflow/core/ops/array_ops.cc
Expand Up @@ -2990,6 +2990,10 @@ REGISTER_OP("Dequantize")
if (!s.ok() && s.code() != error::NOT_FOUND) {
return s;
}
if (axis < -1) {
return errors::InvalidArgument("axis should be at least -1, got ",
axis);
}
const int minmax_rank = (axis == -1) ? 0 : 1;
TF_RETURN_IF_ERROR(shape_inference::UnchangedShape(c));
ShapeHandle minmax;
Expand Down

0 comments on commit da857cf

Please sign in to comment.