Files
libtirpc/0004-xdr-add-a-defensive-mask-in-xdr_int64_t-and-xdr_u_in.patch
Dirk Mueller b62bf7c05a Accepting request 738880 from home:pevik:branches:Base:System
- Updated to libtirpc 1.1.5 rc2 (this includes changes in 1.1.4 release)
  - add libtirpc-1-1-5-rc1.patch and libtirpc-1-1-5-rc2.patch to reflect
    upstream changes after 1.1.4 release
  - remove /etc/bindresvport.blacklist as it's still supported by glibc
    although it's not compiled with --enable-obsolete-rpc
- Drop patches accepted in previous releases or not needed
    - 000-bindresvport_blacklist.patch (accepted in 5b037cc9, libtirpc 1.1.4)
    - 001-new-rpcbindsock-path.patch (not needed, rpcbind now uses /var/run directory)
    - 002-revert-binddynport.patch (fixed in 2802259, libtirpc-1-0-4-rc1)
    - 0001-Fix-regression-introduced-by-change-rpc-version-orde.patch
      (backport of 25d38d7, libtirpc-1-0-4-rc1)
    - 0001-xdrstdio_create-buffers-do-not-output-encoded-values.patch
      (backport of 145272c, libtirpc-1-0-4-rc2)
- Add fixes from upcomming release
    - 0001-Makefile.am-Use-LIBADD-instead-of-LDFLAGS-to-link-ag.patch
    - 0003-man-rpc_secure.3t-Fix-typo-in-manpage.patch
    - 0004-xdr-add-a-defensive-mask-in-xdr_int64_t-and-xdr_u_in.patch

OBS-URL: https://build.opensuse.org/request/show/738880
OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=78
2019-10-28 10:03:38 +00:00

45 lines
1.4 KiB
Diff

From d1208b5de7b52172a34e3a7262e96f99830c9770 Mon Sep 17 00:00:00 2001
From: Stefano Garzarella <sgarzare@redhat.com>
Date: Tue, 3 Sep 2019 10:54:11 -0400
Subject: [PATCH 4/7] xdr: add a defensive mask in xdr_int64_t() and
xdr_u_int64_t()
In order to be more defensive, we should mask bits of u_int64_t
value if we want to use only the first 32bit.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
[Upstream status: d1208b5de7b52172a34e3a7262e96f99830c9770]
---
src/xdr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/xdr.c b/src/xdr.c
index b9a1558..28d1382 100644
--- a/src/xdr.c
+++ b/src/xdr.c
@@ -877,7 +877,8 @@ xdr_int64_t(xdrs, llp)
if (XDR_GETLONG(xdrs, (long *)&ul[1]) == FALSE)
return (FALSE);
*llp = (int64_t)
- (((u_int64_t)ul[0] << 32) | ((u_int64_t)ul[1]));
+ (((u_int64_t)ul[0] << 32) |
+ ((u_int64_t)(ul[1]) & 0xffffffff));
return (TRUE);
case XDR_FREE:
return (TRUE);
@@ -910,7 +911,8 @@ xdr_u_int64_t(xdrs, ullp)
if (XDR_GETLONG(xdrs, (long *)&ul[1]) == FALSE)
return (FALSE);
*ullp = (u_int64_t)
- (((u_int64_t)ul[0] << 32) | ((u_int64_t)ul[1]));
+ (((u_int64_t)ul[0] << 32) |
+ ((u_int64_t)(ul[1]) & 0xffffffff));
return (TRUE);
case XDR_FREE:
return (TRUE);
--
2.23.0