Fixes for GCC 9

Various fixes for issues caught by gcc 9.  Mostly snprintf
trying to copy to a buffer potentially too small.

ASTERISK-28412

Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e
This commit is contained in:
George Joseph
2019-05-10 09:48:28 -06:00
parent 9a0fa51443
commit e7734476c6
8 changed files with 12 additions and 12 deletions

View File

@@ -160,8 +160,8 @@ static void bucket_file_update_path(struct ast_bucket_file *bucket_file,
sizeof(bucket_file->path));
} else if (!strchr(bucket_file->path, '.') && (ext = strrchr(ast_sorcery_object_get_id(bucket_file), '.'))) {
/* If we don't have a file extension and were provided one in the URI, use it */
char new_path[PATH_MAX];
char found_ext[PATH_MAX];
char found_ext[32];
char new_path[PATH_MAX + sizeof(found_ext)];
ast_bucket_file_metadata_set(bucket_file, "ext", ext);