diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-04-18 02:05:34 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-04-18 02:05:34 +0200 |
commit | 1120b9596aaf53399d4739dedb016c731c85f654 (patch) | |
tree | 9905c0d27d45fdb376de096011672379090099cd /lib/csv.c | |
parent | pimd: don't use strcpy (diff) | |
download | frr-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |