diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-24 19:15:20 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-24 20:34:20 -0400 |
| commit | dbfd865b05d6c4e9395a39bb24f5eaf0b850451c (patch) | |
| tree | 91addae6b8793292c899a3c64a56511507a152d1 /eigrpd/eigrp_hello.c | |
| parent | 32e5503d8f987bbc1e8193ce94139d72e7ea7582 (diff) | |
eigrpd: Cleanup various SA Issues
1) Handle key value not found on interface
2) Handle various NULL pointer possibilities
3) Fix possible integer overflow
4) Fix memory leak
5) Check return codes on sscanf
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_hello.c')
| -rw-r--r-- | eigrpd/eigrp_hello.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c index ef10ebf54c..49647c6b85 100644 --- a/eigrpd/eigrp_hello.c +++ b/eigrpd/eigrp_hello.c @@ -412,11 +412,15 @@ void eigrp_sw_version_initialize(void) { char ver_string[] = VERSION; char *dash = strstr(ver_string, "-"); + int ret; if (dash) dash[0] = '\0'; - sscanf(ver_string, "%d.%d", &FRR_MAJOR, &FRR_MINOR); + ret = sscanf(ver_string, "%d.%d", &FRR_MAJOR, &FRR_MINOR); + if (ret != 2) + zlog_err("Did not Properly parse %s, please fix VERSION string", + VERSION); } /** |
