diff options
author | YiFei Zhu <zhuyifei1999@gmail.com> | 2024-01-09 23:50:46 -0800 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-01-13 19:51:12 +0100 |
commit | 4c6a3bdef5e2311bfe68364cdf61f0bee7030814 (patch) | |
tree | 1ee17686750cf1f5857efaa9f766a0dededffb4c /net-proxy | |
parent | net-proxy/tayga: add myself as a maintainer (diff) | |
download | gentoo-4c6a3bdef5e2311bfe68364cdf61f0bee7030814.tar.gz gentoo-4c6a3bdef5e2311bfe68364cdf61f0bee7030814.tar.bz2 gentoo-4c6a3bdef5e2311bfe68364cdf61f0bee7030814.zip |
net-proxy/tayga: Fix "incompatible pointer to integer conversion"
The purpose of the code is to find the separator slash of the CIDR
range, splitting it to the IP and the number of bits in the range.
Assigning NUL character to the memory location completes the string
split, but the code assigns NULL pointer instead. While functionally
the same, the compiler type checking complains.
I'm not revbumping this change because the code should compile the
same in theory.
Closes: https://bugs.gentoo.org/878629
Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/tayga/files/tayga-0.9.2-static-EAM.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net-proxy/tayga/files/tayga-0.9.2-static-EAM.patch b/net-proxy/tayga/files/tayga-0.9.2-static-EAM.patch index cdf1e601194b..6c00bf3f7ebb 100644 --- a/net-proxy/tayga/files/tayga-0.9.2-static-EAM.patch +++ b/net-proxy/tayga/files/tayga-0.9.2-static-EAM.patch @@ -4,7 +4,7 @@ Description: Support SIIT-DC styled EAM static maps . Author: Benda Xu <heroxbd@gentoo.org> Forwarded: Nathan Lutchansky <lutchann@litech.org> -Last-Update: 2018-12-28 +Last-Update: 2024-01-09 --- a/conffile.c +++ b/conffile.c @@ -17,7 +17,7 @@ Last-Update: 2018-12-28 + unsigned int prefix4 = 32; + if (slash) { + prefix4 = atoi(slash+1); -+ slash[0] = NULL; ++ slash[0] = '\0'; + } + if (!inet_pton(AF_INET, args[0], &m->map4.addr)) { @@ -33,7 +33,7 @@ Last-Update: 2018-12-28 + slash = strchr(args[1], '/'); + if (slash) { + prefix6 = atoi(slash+1); -+ slash[0] = NULL; ++ slash[0] = '\0'; + } + + if ((32 - prefix4) != (128 - prefix6)) { |