Message ID | 1504132946-30890-1-git-send-email-joe.hershberger@ni.com |
---|---|
State | Changes Requested |
Delegated to: | Joe Hershberger |
Headers | show |
Series | [U-Boot] net: Correct size of NFS buffers | expand |
Hey Tom, On Wed, Aug 30, 2017 at 5:42 PM, Joe Hershberger <joe.hershberger@ni.com> wrote: > Reported-by: Coverity (CID: 152888) > Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Any comment on this or the other coverity fix? Thanks, -Joe
On Thu, Sep 07, 2017 at 07:52:43PM -0500, Joe Hershberger wrote: > Hey Tom, > > On Wed, Aug 30, 2017 at 5:42 PM, Joe Hershberger <joe.hershberger@ni.com> wrote: > > Reported-by: Coverity (CID: 152888) > > Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> > > Any comment on this or the other coverity fix? Yes, thanks for correcting my fixes! :) They're not so critical that they need to come in before release. Thanks.
diff --git a/net/nfs.h b/net/nfs.h index 70a1a6d..a773cfb 100644 --- a/net/nfs.h +++ b/net/nfs.h @@ -59,7 +59,7 @@ enum rpc_accept_stat { struct rpc_t { union { - uint8_t data[2048]; + uint8_t data[NFS_READ_SIZE + 6 * sizeof(uint32_t)]; struct { uint32_t id; uint32_t type; @@ -76,7 +76,7 @@ struct rpc_t { uint32_t verifier; uint32_t v2; uint32_t astatus; - uint32_t data[NFS_READ_SIZE]; + uint32_t data[NFS_READ_SIZE / sizeof(uint32_t)]; } reply; } u; } __attribute__((packed));
Reported-by: Coverity (CID: 152888) Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> --- net/nfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)