diff mbox

[U-Boot,2/9] net: nfs: Correct the reply data buffer size

Message ID 1471291407-30621-3-git-send-email-joe.hershberger@ni.com
State Accepted
Commit 6279b49e6c2fdaf8665355d1777bc90cd41fcf90
Delegated to: Joe Hershberger
Headers show

Commit Message

Joe Hershberger Aug. 15, 2016, 8:03 p.m. UTC
The type of the buffer is uint32_t, but the parameter used to size it
is referring to bytes. Divide by the size of the array elements.

Strictly speaking, this shouldn't be needed at all... It could just be 1
just like the request.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
---

 net/nfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Hershberger Aug. 23, 2016, 2:28 a.m. UTC | #1
Hi Joe,

https://patchwork.ozlabs.org/patch/659403/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/net/nfs.h b/net/nfs.h
index 45da246..aa4e450 100644
--- a/net/nfs.h
+++ b/net/nfs.h
@@ -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;
 };