diff options
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r-- | ospfd/ospf_lsa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 088f7f31c..3bb8ae873 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -298,7 +298,8 @@ const char *dump_lsa_key(struct ospf_lsa *lsa) strlcpy(id, inet_ntoa(lsah->id), sizeof(id)); strlcpy(ar, inet_ntoa(lsah->adv_router), sizeof(ar)); - sprintf(buf, "Type%d,id(%s),ar(%s)", lsah->type, id, ar); + snprintf(buf, sizeof(buf), "Type%d,id(%s),ar(%s)", lsah->type, + id, ar); } else strlcpy(buf, "NULL", sizeof(buf)); |