[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-21 Thread Michal Ruprich
Follow-up Comment #16, bug #62110 (project wget): Hi Tim, just confirming that the fix works, thanks for the quick solution. Regards, Michal ___ Reply to this item at:

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-20 Thread Tim Ruehsen
Update of bug #62110 (project wget): Status:None => Fixed Assigned to:None => rockdaboot Open/Closed:Open => Closed

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-20 Thread martian
Follow-up Comment #14, bug #62110 (project wget): I compile PR#31 on 32bit mips big endian with musl 1.1 and 1.2, both work as expected. ___ Reply to this item at:

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-20 Thread Tim Ruehsen
Follow-up Comment #13, bug #62110 (project wget): Created https://gitlab.com/gnuwget/wget/-/merge_requests/31 to address this issue. Can someone please provide feedback for 32 bit little and big endian ? ___ Reply to this item at:

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-20 Thread Tim Ruehsen
Follow-up Comment #12, bug #62110 (project wget): IMO, the problem is that the code uses a time_t variable and uses sscanf SCNd64. That means that time_t *must* be a 64bit integer (signed or unsigned doesn't matter), which is of course not always true. C99/C11 does not define a format specifier

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-18 Thread Petr Pisar
Follow-up Comment #11, bug #62110 (project wget): Indeed. A 32-bit big-endian MIPS: $ file staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/crtbegin.o staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/lib/gcc/mips-openwrt-linux-musl/8.4.0/crtbegin.o: ELF 32-bit

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-17 Thread martian
Follow-up Comment #10, bug #62110 (project wget): Yeah, I compile wget 1.21.3 with OpenWRT sdk from downloaded https://downloads.openwrt.org/releases/21.02.2/targets/ath79/generic/openwrt-sdk-21.02.2-ath79-generic_gcc-8.4.0_musl.Linux-x86_64.tar.xz It's big endian and has 32bit time_t provided

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-17 Thread Petr Pisar
Follow-up Comment #9, bug #62110 (project wget): Yes, i686 is 32-bit little-endian and GCC supports int64_t there. However, the original reporter wrote "broken on 32 bit big endian devices". ___ Reply to this item at:

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-17 Thread Michal Ruprich
Follow-up Comment #8, bug #62110 (project wget): Hi Pert, thanks for the input. The failing hsts test was on i686 in Fedora and I am no 100% sure but that should be little-endian right? ___ Reply to this item at:

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-17 Thread Petr Pisar
Follow-up Comment #7, bug #62110 (project wget): That gnulib "int64" code does not work on all platforms. It only works on platforms where a 64-bit integer type is supported by the compiler (int64_t in stdint.h). For the sake of completeness, it is supported e.g. by GCC on 32-bit little-endian

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-16 Thread martian
Follow-up Comment #6, bug #62110 (project wget): IMO, the following code should always get the correct result on any platform. If not, that should be a bug of gnulib. int64 x; sscanf(buf, "%" SCNd64, ); ___ Reply to this

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-16 Thread Michal Ruprich
Follow-up Comment #5, bug #62110 (project wget): The problem in the test is that the sscanf in hsts_read_database tries to read values 1647421226 and 123456 into variables 'created' and 'max_age; and the results are numbers 530239482494976 and 6224032784512362224. In Fedora, I changed the sscanf

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-15 Thread Michal Ruprich
Follow-up Comment #4, bug #62110 (project wget): Reversing commit e1bacd2fa5f026f9493bd74e9179b859fa9ce8f1 - src/hsts.c (hsts_read_database): Read time_t values as long long helps. ___ Reply to this item at:

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-15 Thread Michal Ruprich
Follow-up Comment #3, bug #62110 (project wget): Hi, when building new wget for i686, Test-hsts.py is the only test that fails. Seems to me that there is something wrong with the server in this test: Reading HSTS entries from /root/rpmbuild/BUILD/wget-1.21.3/testenv/.wget-hsts-testenv URI

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-11 Thread martian
Follow-up Comment #2, bug #62110 (project wget): Excuse me, what failure did you get? I'm not getting any problems. ___ Reply to this item at: ___

[bug #62110] HSTS broken on 32 bit big endian devices

2022-03-11 Thread Michal Ruprich
Follow-up Comment #1, bug #62110 (project wget): Just adding a bit of info. When --disable-year2038 is used, hsts fails with this patch but metalink works. Without the option, all metalink tests fail but hsts runs ok. ___ Reply to this

[bug #62110] HSTS broken on 32 bit big endian devices

2022-02-24 Thread martian
URL: Summary: HSTS broken on 32 bit big endian devices Project: GNU Wget Submitted by: martian Submitted on: Thu 24 Feb 2022 10:50:28 AM UTC Category: Feature Request