Hi Alex,
Ack Thanks Lennart ________________________________ Från: Jones, Alex <[email protected]> Skickat: den 17 januari 2019 20:27 Till: Hans Nordebäck; Lennart Lund; Anders Widell; Vu Minh Nguyen Kopia: [email protected]; Jones, Alex Ämne: [PATCH 3/5] log: fix truncation warning [#2999] --- src/log/apitest/tet_LogOiOps.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/log/apitest/tet_LogOiOps.c b/src/log/apitest/tet_LogOiOps.c index 23fe13838..e74cd5331 100644 --- a/src/log/apitest/tet_LogOiOps.c +++ b/src/log/apitest/tet_LogOiOps.c @@ -99,8 +99,11 @@ void m_restoreData(SaNameT objName, char *attr, void *v_attr, attr, *(SaUint64T *)v_attr); break; case SA_IMM_ATTR_SASTRINGT: - sprintf(command, "immcfg %s -a %s='%s' 2> /dev/null", name, - attr, (char *)v_attr); + if (snprintf(command, MAX_DATA, + "immcfg %s -a %s='%s' 2> /dev/null", name, + attr, (char *)v_attr) >= MAX_DATA) { + fprintf(stderr, "command truncated: %s", command); + } break; default: fprintf(stderr, "Unsupported data type (%s) \n", attr); -- 2.17.2 ________________________________ Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments. ________________________________ _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
