summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2020-04-18 20:47:32 +0200
committerGitHub <noreply@github.com>2020-04-18 20:47:32 +0200
commit034cb57fd2f28b5147223f318e6827aeddc0eadf (patch)
tree96eb199f130f50779c125c544c2c713755205ca3 /lib
parent7eea88e8c9720113893810b541b5ebf7ef0ecea8 (diff)
parent1120b9596aaf53399d4739dedb016c731c85f654 (diff)
Merge pull request #6256 from qlyoung/pimd-no-strcpy
Diffstat (limited to 'lib')
-rw-r--r--lib/csv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/csv.c b/lib/csv.c
index 445742807c..45ace9777c 100644
--- a/lib/csv.c
+++ b/lib/csv.c
@@ -1,5 +1,5 @@
/* CSV
- * Copyright (C) 2013 Cumulus Networks, Inc.
+ * Copyright (C) 2013,2020 Cumulus Networks, Inc.
*
* This file is part of Quagga.
*
@@ -22,6 +22,8 @@
#include "config.h"
#endif
+#include <zebra.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -419,7 +421,7 @@ void csv_clone_record(csv_t *csv, csv_record_t *in_rec, csv_record_t **out_rec)
}
rec->record = curr;
rec->rec_len = in_rec->rec_len;
- strcpy(rec->record, in_rec->record);
+ strlcpy(rec->record, in_rec->record, csv->buflen);
/* decode record into fields */
csv_decode_record(rec);