openwrt/package/utils
Liangbin Lian bf78cd3514 lua: lnum: fix strtoul based number parsing
Lua's LNUM patch currently doesn't parse properly certain numbers as
it's visible from the following simple tests.

On x86_64 host (stock Lua 5.1.5, expected output):

 $ /usr/bin/lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  2147483648
  8796093022208
  4294967296

On x86_64 host:

 $ staging_dir/hostpkg/bin/lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  0
  0

On x86_64 target:

 $ lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  0
  0

On ath79 target:

 $ lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  8796093022208
  4294967296

It's caused by two issues fixed in this patch, first issue is caused by
unhadled strtoul overflow and second one is caused by the cast of
unsigned to signed Lua integer when parsing from hex literal.

Run tested on:

 * Zidoo Z9S with RTD1296 CPU (aarch64_cortex-a53)
 * qemu/x86_64
 * qemu/armvirt_64
 * ath79

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
[commit subject/message touches, fixed From to match SOB, fixed another
 unhandled case in luaO_str2i, host Lua, package bump]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 4bb9af48ca)
2020-09-28 00:37:50 +02:00
..
adb adb: fix package description 2017-10-29 16:16:35 +01:00
admswconfig treewide: clean up download hashes 2016-12-16 22:39:22 +01:00
bsdiff bsdiff: Also pass down TARGET_CPPFLAGS 2017-03-01 17:19:50 -08:00
busybox busybox: strip off ALTERNATIVES spec 2019-07-12 07:52:38 +00:00
bzip2 bzip2: Fix CVE-2019-12900 2019-09-03 12:55:00 +02:00
ct-bugcheck merge: packages: update branding in core packages 2017-12-08 19:41:18 +01:00
e2fsprogs e2fsprogs: Fix CVE-2019-5094 in libsupport 2020-01-01 20:55:17 +01:00
f2fs-tools package/utils/f2fs-tools: Update to 1.10.0 2018-04-03 23:26:45 +02:00
fbtest utils/fbtest: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:51 +02:00
fritz-tools fritz_tffs_read: get tffs size from input file 2017-06-24 22:36:38 +02:00
fuse add PKG_CPE_ID ids to package and tools 2017-11-17 02:24:35 +01:00
jboot-tools firmware: add JBOOT based devices config extractor 2018-03-18 22:22:38 +01:00
jsonfilter jsonfilter: update to latest git HEAD 2018-03-14 18:48:23 +01:00
lua lua: lnum: fix strtoul based number parsing 2020-09-28 00:37:50 +02:00
mdadm mdadm: fix parameter quoting 2017-10-27 03:26:37 +02:00
mtd-utils mtd-utils: revert faulty upstream patch for now 2018-06-08 09:33:44 +02:00
nvram packages: nvram: fix memory leak in _nvram_free 2017-11-15 21:11:23 +01:00
osafeloader packages: mark packages depending on a target as nonshared 2017-01-24 09:45:05 +01:00
oseama utils/oseama: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
otrx otrx: fix memory leak in otrx_create_append_zeros 2017-11-17 11:32:51 +01:00
px5g mbedtls: Update to 2.12.0 2018-08-08 22:49:59 +02:00
spidev_test utils/spidev_test: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
ugps ugps: update to latest git HEAD 2018-12-18 17:22:06 +01:00
usbmode treewide: replace LEDE_GIT with PROJECT_GIT 2018-01-10 21:27:32 +01:00
usbreset utils/usbreset: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
usbutils usbutils: Update usb.ids to 0.315 2018-12-18 11:28:13 +01:00
util-linux flock: enable alternatives support 2018-05-07 15:50:18 +08:00
xfsprogs xfsprogs: Replace valloc with posix_memalign 2019-08-14 09:12:52 +02:00