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

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


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

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 2bd1d9d..b4a859e 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -1408,7 +1408,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;
@@ -1624,7 +1624,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/+/13737
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ib45c54daaea8e0d571cb470cab1daaae2edba968
Gerrit-Change-Number: 13737
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/b96d163f/attachment.html>


More information about the asterisk-code-review mailing list