aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-12-14 18:09:39 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2016-12-26 08:23:23 +0100
commit226ea3d8b1bf5c9d5ed560a1c9cb7060199ac177 (patch)
tree7584e141ae3cb6a4d2c01a9bf58e277f7676d0e1 /meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch
parent29881464a7a2e36a29ce7d87be929f840f5e9a55 (diff)
downloadmeta-openembedded-contrib-226ea3d8b1bf5c9d5ed560a1c9cb7060199ac177.tar.gz
liboop: Add recipe
liboop is needed by ruli Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch')
-rw-r--r--meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch b/meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch
new file mode 100644
index 0000000000..1880a241ac
--- /dev/null
+++ b/meta-oe/recipes-support/liboop/liboop/read_bugfixes.patch
@@ -0,0 +1,40 @@
+From: Ian Jackson <ijackson@chiark.greenend.org.uk>
+Applied-Upstream: no
+Bug-Debian: http://bugs.debian.org/579604
+Subject: oop-read.h bugfixes
+
+Some years ago I contributed a feature for reading lines and records
+to liboop: oop-read.h and read.c. Since it took a while for that
+feature to make it into distributed versions, for a long time I've
+been using my own copy of the source file. It seems that I fixed a
+couple of bugs in my copy which are still in the Debian package. I
+can't find any record of me having told anyone about them and now I
+find that 1.0-6 still has the bugs.
+
+There are two fixes:
+ * Initialise "rd->discard" properly
+ * Avoid rd->neednotcheck becoming negative
+
+--- a/read.c
++++ b/read.c
+@@ -114,6 +114,7 @@ oop_read *oop_rd_new(oop_source *oop, oo
+ rd->allocbuf= 0;
+ rd->used= 0;
+ rd->alloc= buf ? bufsz : 0;
++ rd->discard= 0;
+ rd->neednotcheck= 0;
+ rd->displacedchar= -1;
+ rd->style= *OOP_RD_STYLE_IMMED;
+@@ -235,7 +236,11 @@ static void *on_process(oop_source *oop,
+
+ if (rd->discard) {
+ rd->used -= rd->discard;
+- rd->neednotcheck -= rd->discard;
++ if (rd->neednotcheck > rd->discard) {
++ rd->neednotcheck -= rd->discard;
++ } else {
++ rd->neednotcheck= 0;
++ }
+ memmove(buf, buf + rd->discard, rd->used);
+ rd->discard= 0;
+ }