fix undefined shift in put_res_rec
This commit is contained in:
parent
edc1f6e252
commit
c62dc18928
35
backport-fix-undefined-shift-in-put_res_rec.patch
Normal file
35
backport-fix-undefined-shift-in-put_res_rec.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 14f56750fcf51a1d6daa14da08b34eb789241a23 Mon Sep 17 00:00:00 2001
|
||||
From: eaglegai <eaglegai@163.com>
|
||||
Date: Thu, 28 Oct 2021 21:51:13 +0800
|
||||
Subject: [PATCH] fix undefined-shift in put_res_rec
|
||||
fuzz error:
|
||||
../../source3/libsmb/nmblib.c:451:4: runtime error: left shift of 65312 by 16
|
||||
places cannot be represented in type 'int'
|
||||
|
||||
Author: eaglegai <eaglegai@163.com>
|
||||
|
||||
Signed-off-by: eaglegai <eaglegai@163.com>
|
||||
Reviewed-by: Jeremy Allison <jra@samba.org>
|
||||
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
|
||||
|
||||
Autobuild-User(master): Jeremy Allison <jra@samba.org>
|
||||
Autobuild-Date(master): Fri Oct 29 20:29:26 UTC 2021 on sn-devel-184
|
||||
---
|
||||
source3/libsmb/nmblib.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
|
||||
index ff009092bbf..607470f7e4e 100644
|
||||
--- a/source3/libsmb/nmblib.c
|
||||
+++ b/source3/libsmb/nmblib.c
|
||||
@@ -449,7 +449,7 @@ static int put_res_rec(char *buf, size_t buflen, int offset,struct res_rec *recs
|
||||
if (buf) {
|
||||
RSSVAL(buf,offset,recs[i].rr_type);
|
||||
RSSVAL(buf,offset+2,recs[i].rr_class);
|
||||
- RSIVAL(buf,offset+4,recs[i].ttl);
|
||||
+ RSIVAL(buf,offset+4,(unsigned int)recs[i].ttl);
|
||||
RSSVAL(buf,offset+8,recs[i].rdlength);
|
||||
memcpy(buf+offset+10,recs[i].rdata,recs[i].rdlength);
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
Name: samba
|
||||
Version: 4.12.5
|
||||
Release: 8
|
||||
Release: 9
|
||||
|
||||
Summary: A suite for Linux to interoperate with Windows
|
||||
License: GPLv3+ and LGPLv3+
|
||||
@ -86,6 +86,7 @@ Patch16: backport-lib-ldb-Limit-depth-of-ldb_parse_tree.patch
|
||||
Patch17: backport-witness-idl-fix-length-calculation-for-witness_IPaddrInfoList.patch
|
||||
Patch18: backport-lzxpress-avoid-technically-undefined-shift.patch
|
||||
Patch19: backport-utils-asn1-avoid-undefined-behaviour.patch
|
||||
Patch20: backport-fix-undefined-shift-in-put_res_rec.patch
|
||||
|
||||
BuildRequires: avahi-devel bison cups-devel dbus-devel docbook-style-xsl e2fsprogs-devel flex gawk gnupg2 gnutls-devel >= 3.4.7 gpgme-devel
|
||||
BuildRequires: jansson-devel krb5-devel >= %{required_mit_krb5} libacl-devel libaio-devel libarchive-devel libattr-devel
|
||||
@ -3220,6 +3221,12 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Nov 05 2021 gaihuiying <gaihuiying1@huawei.com> - 4.12.5-9
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix undefined shift in put_res_rec
|
||||
|
||||
* Fri Oct 29 2021 gaihuiying <gaihuiying1@huawei.com> - 4.12.5-8
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user