lib: don't use strcpy

>:(

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2020-04-17 20:05:34 -04:00
parent 96e43299b4
commit 1120b9596a

View File

@ -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);