From b8ba95db482a6610244c56af4b776dc341aa6968 Mon Sep 17 00:00:00 2001 From: Nils Abegg Date: Tue, 19 Jun 2018 10:47:12 +0200 Subject: [PATCH] Added correct escaping of single quotes in values of a dbf db field --- sqlite3-dbf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sqlite3-dbf.h b/sqlite3-dbf.h index 47fbe58..5a0f940 100644 --- a/sqlite3-dbf.h +++ b/sqlite3-dbf.h @@ -144,6 +144,9 @@ static void safeprintbuf(const char *buf, const size_t inputsize) t = targetbuf; for(s = buf; s <= lastchar; s++) { switch(*s) { + case '\'': + *t++ = '\''; + *t++ = '\''; case '\\': *t++ = '\\'; *t++ = '\\';