summaryrefslogtreecommitdiffstats
path: root/lib/csv.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-04-18 02:05:34 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-04-18 02:05:34 +0200
commit1120b9596aaf53399d4739dedb016c731c85f654 (patch)
tree9905c0d27d45fdb376de096011672379090099cd /lib/csv.c
parentpimd: don't use strcpy (diff)
downloadfrr-1120b9596aaf53399d4739dedb016c731c85f654.tar.xz
frr-1120b9596aaf53399d4739dedb016c731c85f654.zip
lib: don't use strcpy
>:( Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/csv.c')
-rw-r--r--lib/csv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/csv.c b/lib/csv.c
index 445742807..45ace9777 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);