[Asterisk-code-review] func_odbc: Prevent snprintf() truncation warning (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Feb 11 14:34:14 CST 2020


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13782 )

Change subject: func_odbc: Prevent snprintf() truncation warning
......................................................................

func_odbc: Prevent snprintf() truncation warning

For reasons that are not clear to me - this only appears for me when
_not_ building in dev-mode.

Change-Id: Ib45c54daaea8e0d571cb470cab1daaae2edba968
---
M funcs/func_odbc.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; Approved for Submit
  George Joseph: Looks good to me, approved



diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index f9fa971..e9fe597 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -1406,7 +1406,7 @@
 		AST_APP_ARG(field)[100];
 	);
 	struct ast_str *sql;
-	char *char_args, varname[10];
+	char *char_args, varname[15];
 	struct acf_odbc_query *query;
 	struct ast_channel *chan;
 	int i;
@@ -1622,7 +1622,7 @@
 		AST_APP_ARG(field)[100];
 	);
 	struct ast_str *sql;
-	char *char_args, *char_values, varname[10];
+	char *char_args, *char_values, varname[15];
 	struct acf_odbc_query *query;
 	struct ast_channel *chan;
 	int i;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13782
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ib45c54daaea8e0d571cb470cab1daaae2edba968
Gerrit-Change-Number: 13782
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200211/229e5b85/attachment.html>


More information about the asterisk-code-review mailing list