From eb23c6008753b1cdc5359dead3a096dce46c9018 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 30 Nov 2019 12:26:37 +0100 Subject: Fix #78878: Buffer underflow in bc_shift_addsub We must not rely on `isdigit()` to detect digits, since we only support decimal ASCII digits in the following processing. --- ext/bcmath/tests/bug78878.phpt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ext/bcmath/tests/bug78878.phpt (limited to 'ext/bcmath/tests') diff --git a/ext/bcmath/tests/bug78878.phpt b/ext/bcmath/tests/bug78878.phpt new file mode 100644 index 0000000000..2c9d72b946 --- /dev/null +++ b/ext/bcmath/tests/bug78878.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #78878 (Buffer underflow in bc_shift_addsub) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bc math warning: non-zero scale in modulus +0 -- cgit v1.2.1