summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-17 14:38:21 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-17 14:38:21 +0100
commit880a5cdfdda0e5176f826c68b8afcea915829a4d (patch)
treea115828930488954f76c5bd7d45a40aba7bc61a6
parent22ac2057a73db5009cc360ecc0748791aaa484c6 (diff)
Fix overrun when quotes are unescaped
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/0100-unescaped_quotes.patch19
-rw-r--r--debian/patches/series1
3 files changed, 27 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 3180ce9..41f5009 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+fast-cpp-csv-parser (0.0+git20160525~9bf299c-2) UNRELEASED; urgency=medium
+
+ * New debain/patches/0100-unescaped_quotes.patch:
+ - Fix overrun when quotes are unescaped.
+
+ -- Jörg Frings-Fürst <debian@jff-webhosting.net> Thu, 17 Nov 2016 14:32:30 +0100
+
fast-cpp-csv-parser (0.0+git20160525~9bf299c-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/patches/0100-unescaped_quotes.patch b/debian/patches/0100-unescaped_quotes.patch
new file mode 100644
index 0000000..29b310d
--- /dev/null
+++ b/debian/patches/0100-unescaped_quotes.patch
@@ -0,0 +1,19 @@
+Description: fix overrun when quotes are unescaped
+Origin: upstream
+Bug: https://github.com/ben-strasser/fast-cpp-csv-parser/pull/32
+Last-Update: 2016-11-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/csv.h
+===================================================================
+--- trunk.orig/csv.h
++++ trunk/csv.h
+@@ -786,7 +786,7 @@ namespace io{
+ --col_end;
+ char*out = col_begin;
+ for(char*in = col_begin; in!=col_end; ++in){
+- if(*in == quote && *(in+1) == quote){
++ if(*in == quote && (in+1) != col_end && *(in+1) == quote){
+ ++in;
+ }
+ *out = *in;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b10f1b0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0100-unescaped_quotes.patch