Message ID | 20180327134544.16986-2-h.morris@cascoda.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c index 377af43b8..06cac8d3f 100644 --- a/drivers/net/ieee802154/ca8210.c +++ b/drivers/net/ieee802154/ca8210.c @@ -2511,6 +2511,13 @@ static ssize_t ca8210_test_int_user_write( ); return -EIO; } + if (len != command[1] + 2) { + dev_err( + &priv->spi->dev, + "write len does not match packet length field\n" + ); + return -EMSGSIZE; + } ret = ca8210_test_check_upstream(command, priv->spi); if (ret == 0) {