[Asterisk-code-review] app osplookup.c: Avoid two format truncations. (asterisk[master])

Jenkins2 asteriskteam at digium.com
Fri Jan 12 10:36:24 CST 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7948 )

Change subject: app_osplookup.c: Avoid two format truncations.
......................................................................

app_osplookup.c: Avoid two format truncations.

GCC 7 warned about this.

ASTERISK-27578

Change-Id: I4a00458dbe9b575ef04338b6a7852272745e1552
---
M apps/app_osplookup.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  Matthew Fredrickson: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index d749a74..c42e187 100644
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -2346,7 +2346,7 @@
 	struct osp_headers headers;
 	unsigned int i;
 	const char* cinfo[OSP_MAX_CUSTOMINFO] = { NULL };
-	char buffer[OSP_SIZE_TOKSTR];
+	char buffer[OSP_SIZE_TOKSTR + strlen(": ") + strlen(OSP_SIP_HEADER)];
 	struct osp_results results;
 	const char* status;
 	char* tmp;
@@ -2632,7 +2632,7 @@
 	struct ast_var_t* current;
 	struct osp_results results;
 	OSPE_OPERATOR_NAME type;
-	char buffer[OSP_SIZE_TOKSTR];
+	char buffer[OSP_SIZE_TOKSTR + strlen(": ") + strlen(OSP_SIP_HEADER)];
 	unsigned int callidtypes = OSP_CALLID_UNDEF;
 	const char* status;
 	char* tmp;

-- 
To view, visit https://gerrit.asterisk.org/7948
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4a00458dbe9b575ef04338b6a7852272745e1552
Gerrit-Change-Number: 7948
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180112/c3a6c353/attachment-0001.html>


More information about the asterisk-code-review mailing list