buildroot/package/bc/01_array_initialize.patch
Robert Sohn 1faa7c344e bc: bump version to 1.06.95
The current version of bc being used (1.06) is from 2000 and contains a
serious bug causing it to segfault when the math library is used, so bump to
the latest alpha release, which is also 9 years old.

Also include two fixes for Debian (https://packages.debian.org/jessie/bc)

- A patch to fix array initialization by Phul Nelson
- A patch to get bc to notice I/O errors by Ian Jackson

[Peter: fixup white space and tweak commit message]
Signed-off-by: Robert Sohn <grepper@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-06-13 10:02:36 +02:00

21 lines
631 B
Diff

Description: Fix array initialization bug
Author: Phil Nelson
Origin: upstream
Bug-Debian: http://bugs.debian.org/586969
Bug-Debian: http://bugs.debian.org/671513
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: bc/bc/storage.c
===================================================================
--- bc.orig/bc/storage.c 2013-06-02 20:34:09.401273864 -0400
+++ bc/bc/storage.c 2013-06-02 20:34:11.000000000 -0400
@@ -179,7 +179,7 @@
/* Initialize the new elements. */
- for (; indx < v_count; indx++)
+ for (; indx < a_count; indx++)
arrays[indx] = NULL;
/* Free the old elements. */