summaryrefslogtreecommitdiff
path: root/lib/csv.c
AgeCommit message (Collapse)Author
2021-06-29lib: Avoid using assignments within checksDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-20*: use appropriate buffer sizes, specifiersQuentin Young
- Fix 1 byte overflow when showing GR info in bgpd - Use PATH_MAX for path buffers - Use unsigned specifiers for uint16_t's in zebra pbr Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-20*: sprintf -> snprintfQuentin Young
Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-17lib: don't use strcpyQuentin Young
>:( Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-09*: Remove parenthesis on return for constantsDonatas Abraitis
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2018-09-09Merge pull request #2965 from opensourcerouting/buildfoo-20180904Donald Sharp
more build fixes & warning-free build
2018-09-08*: fix config.h/zebra.h include orderDavid Lamparter
config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-09-08*: fix clang-6 SA warningsDavid Lamparter
I don't see these in CI, but my local clang-6 does emit warnings for these. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-06-18babeld, lib, ospfd, tests: fmt fixes (cppcheck)paco
Signed-off-by: F. Aragon <paco@voltanet.io>
2017-12-05lib: Fix gcc 7 warning 'error: ‘fld’ may be used uninitialized in this ↵Martin Winter
function' Warning breaks Debian Package build with gcc 7 which uses -Werror=maybe-uninitialized Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10lib: Fix missing va_endDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-09Merge pull request #1310 from vjardin6WIND/null_referencesDonald Sharp
lib: linklist avoid access NULL->data
2017-10-09lib: csv unit testsVincent JARDIN
Fix csv unit tests. To be run using, gcc -o csv csv.c -DTEST_CSV ./csv Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-10-09lib: fix NULL->field_len accessVincent JARDIN
Currenlty, this function is used only by: - unit test of csv.c (see its main() section) - ptm_lib.c In case of ptm, it is safe to return NULL because: csv_encode_record() -> return NULL _ptm_lib_encode_header() -> return NULL the only consumer of the return value is: ptm_lib_init_msg() that checks the NULL return. Warning: Access to field 'field_len' results in a dereference of a null pointer (loaded from variable 'fld') Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-10lib: fix remaining coverity issuesDavid Lamparter
Reported-by: Coverity Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-08lib: csv: plug memleaksDavid Lamparter
Reported-by: Coverity Scan Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-18*: Fix up licensing to be rightDonald Sharp
These files were submitted by Cumulus but did not properly setup the licensing of them. This fixes that issue. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-20lib: Compiler warning fixDonald Sharp
There exists a code path where fld would be used uninitialized. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2015-06-12This patch changes BGP from only listening mode for BFD status updates to ↵Donald Sharp
interactive mode of dynamically registering/deregistering BFD enabled peers with PTM/BFD through zebra. Peer is registered with BFD when it goes into established state and de-registers when it goes out of establish state. This patch also adds BFD multihop support for BGP. Whether a peer is multi-hop or single hop is determined internally. All IGP peers are considered as multi-hop peers. EBGP peers are considered as single hop unless configured as multi-hop. BGP BFD command enhancement to configure BFD parameters (detect multiplier, min rx and min tx). router bgp <as-number> neighbor <name/ip-address> bfd <detect mult> <min rx> <min tx> Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Vipin Kumar <vipin@cumulusnetworks.com> Reviewed-by: Kanna Rajagopal <kanna@cumulusnetworks.com>