[Asterisk-code-review] res_stir_shaken: Pass actual max size to snprintf. (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Fri May 1 07:28:48 CDT 2020
Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14335 )
Change subject: res_stir_shaken: Pass actual max size to snprintf.
......................................................................
res_stir_shaken: Pass actual max size to snprintf.
Change-Id: Ice5d92ecea2f1101c80487484f48ef98be2f1824
---
M res/res_stir_shaken.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/35/14335/1
diff --git a/res/res_stir_shaken.c b/res/res_stir_shaken.c
index 3f79596..025138e 100644
--- a/res/res_stir_shaken.c
+++ b/res/res_stir_shaken.c
@@ -477,7 +477,7 @@
filename = basename(public_key_url);
file_path_size = strlen(ast_config_AST_DATA_DIR) + 3 + strlen(STIR_SHAKEN_DIR_NAME) + strlen(filename) + 1;
file_path = ast_calloc(1, file_path_size);
- snprintf(file_path, sizeof(*file_path), "%s/keys/%s/%s", ast_config_AST_DATA_DIR, STIR_SHAKEN_DIR_NAME, filename);
+ snprintf(file_path, file_path_size, "%s/keys/%s/%s", ast_config_AST_DATA_DIR, STIR_SHAKEN_DIR_NAME, filename);
/* Download to the default path */
if (run_curl(public_key_url, file_path)) {
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14335
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ice5d92ecea2f1101c80487484f48ef98be2f1824
Gerrit-Change-Number: 14335
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200501/a26f1cbd/attachment.html>
More information about the asterisk-code-review
mailing list