summaryrefslogtreecommitdiff
path: root/lib/csv.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csv.c')
-rw-r--r--lib/csv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/csv.c b/lib/csv.c
index ce84783aa6..2752974df5 100644
--- a/lib/csv.c
+++ b/lib/csv.c
@@ -563,6 +563,8 @@ void csv_decode(csv_t *csv, char *inbuf)
csv_record_t *rec;
buf = (inbuf) ? inbuf : csv->buf;
+ assert(buf);
+
pos = strpbrk(buf, "\n");
while (pos != NULL) {
rec = calloc(1, sizeof(csv_record_t));