repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f91424
)
Make sure the the value is unsigned before we OR it into the uint64_t
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sun, 20 Oct 2013 19:41:56 +0000
(12:41 -0700)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sun, 20 Oct 2013 19:41:56 +0000
(12:41 -0700)
or else the sign might be extended.
lib/libnfs-zdr.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libnfs-zdr.c
b/lib/libnfs-zdr.c
index 5f7964837a510fffea8f3cc9b0623c8244b8b024..21cd9e13fe5de2ca0c3f00aa3cf8399b9780b800 100644
(file)
--- a/
lib/libnfs-zdr.c
+++ b/
lib/libnfs-zdr.c
@@
-124,7
+124,7
@@
bool_t libnfs_zdr_u_quad_t(ZDR *zdrs, uint64_t *u)
*u = ntohl(*(uint32_t *)&zdrs->buf[zdrs->pos]);
zdrs->pos += 4;
*u <<= 32;
- *u |= ntohl(*(uint32_t *)&zdrs->buf[zdrs->pos]);
+ *u |=
(uint32_t)
ntohl(*(uint32_t *)&zdrs->buf[zdrs->pos]);
zdrs->pos += 4;
return TRUE;
break;