<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8936">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Fix GCC 8 build issues.<br><br>This fixes build warnings found by GCC 8. In some cases format<br>truncation is intentional so the warning is just suppressed.<br><br>ASTERISK-27824 #close<br><br>Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84<br>---<br>M addons/Makefile<br>M apps/Makefile<br>M apps/app_minivm.c<br>M apps/app_queue.c<br>M apps/app_sms.c<br>M apps/app_test.c<br>M apps/app_voicemail.c<br>M channels/Makefile<br>M channels/chan_dahdi.c<br>M channels/chan_iax2.c<br>M channels/chan_sip.c<br>M channels/chan_skinny.c<br>M channels/iax2/parser.c<br>M configure<br>M configure.ac<br>M funcs/func_groupcount.c<br>M main/config.c<br>M main/manager.c<br>M main/pbx.c<br>M makeopts.in<br>M pbx/dundi-parser.c<br>M pbx/pbx_dundi.c<br>M res/Makefile<br>M res/res_config_ldap.c<br>M res/res_musiconhold.c<br>M tests/Makefile<br>M tests/test_voicemail_api.c<br>M utils/Makefile<br>M utils/ael_main.c<br>M utils/astman.c<br>M utils/db1-ast/hash/ndbm.c<br>M utils/extconf.c<br>32 files changed, 96 insertions(+), 55 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/36/8936/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/addons/Makefile b/addons/Makefile<br>index 3d4045d..0c11bfc 100644<br>--- a/addons/Makefile<br>+++ b/addons/Makefile<br>@@ -65,6 +65,7 @@<br> format_mp3.so: mp3/common.o mp3/dct64_i386.o mp3/decode_ntom.o mp3/layer3.o mp3/tabinit.o mp3/interface.o<br> endif<br> <br>+chan_mobile.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br> chan_ooh323.o: _ASTCFLAGS+=$(H323CFLAGS)<br> chan_ooh323.so: _ASTCFLAGS+=$(H323CFLAGS)<br> chan_ooh323.so: $(addprefix ooh323c/src/,$(H323OBJS)) chan_ooh323.o ooh323cDriver.o<br>diff --git a/apps/Makefile b/apps/Makefile<br>index 13c77ab..3e3dc00 100644<br>--- a/apps/Makefile<br>+++ b/apps/Makefile<br>@@ -30,7 +30,11 @@<br> clean::<br> rm -f confbridge/*.o confbridge/*.i confbridge/*.gcda confbridge/*.gcno<br> <br>+app_confbridge.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br>+app_meetme.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br>+app_minivm.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br> app_voicemail.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br>+app_while.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br> <br> app_confbridge.so: $(subst .c,.o,$(wildcard confbridge/*.c))<br> $(subst .c,.o,$(wildcard confbridge/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,app_confbridge)<br>diff --git a/apps/app_minivm.c b/apps/app_minivm.c<br>index a3dcef8..64ba7e0 100644<br>--- a/apps/app_minivm.c<br>+++ b/apps/app_minivm.c<br>@@ -2788,11 +2788,11 @@<br> switch (tmpwrite[1]) {<br> case 'n':<br> memmove(tmpwrite + len, tmpwrite + 2, strlen(tmpwrite + 2) + 1);<br>- strncpy(tmpwrite, "\n", len);<br>+ strcpy(tmpwrite, "\n"); /* SAFE */<br> break;<br> case 't':<br> memmove(tmpwrite + len, tmpwrite + 2, strlen(tmpwrite + 2) + 1);<br>- strncpy(tmpwrite, "\t", len);<br>+ strcpy(tmpwrite, "\t"); /* SAFE */<br> break;<br> default:<br> ast_log(LOG_NOTICE, "Substitution routine does not support this character: %c\n", tmpwrite[1]);<br>diff --git a/apps/app_queue.c b/apps/app_queue.c<br>index b42eac2..390bdb0 100644<br>--- a/apps/app_queue.c<br>+++ b/apps/app_queue.c<br>@@ -6411,7 +6411,7 @@<br> static void setup_mixmonitor(struct queue_ent *qe, const char *filename)<br> {<br> char escaped_filename[256];<br>- char file_with_ext[256];<br>+ char file_with_ext[264];<br> char mixmonargs[1512];<br> char escaped_monitor_exec[1024];<br> const char *monitor_options;<br>diff --git a/apps/app_sms.c b/apps/app_sms.c<br>index c3d8ccd..df84d2a 100644<br>--- a/apps/app_sms.c<br>+++ b/apps/app_sms.c<br>@@ -1207,7 +1207,7 @@<br> {<br> struct ast_tm tm;<br> struct timeval now = h->scts;<br>- char stm[9];<br>+ char stm[45];<br> <br> h->omsg[0] = 0x00; /* set later... */<br> h->omsg[1] = 0;<br>diff --git a/apps/app_test.c b/apps/app_test.c<br>index a5494c5..ba5960d 100644<br>--- a/apps/app_test.c<br>+++ b/apps/app_test.c<br>@@ -332,7 +332,7 @@<br> {<br> int res = 0;<br> char testid[80]="";<br>- char fn[80];<br>+ char fn[104];<br> FILE *f;<br> if (ast_channel_state(chan) != AST_STATE_UP)<br> res = ast_answer(chan);<br>diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c<br>index 86f2873..db65c12 100644<br>--- a/apps/app_voicemail.c<br>+++ b/apps/app_voicemail.c<br>@@ -1010,7 +1010,7 @@<br> int old_new;<br> int old_old;<br> char *uniqueid;<br>- char mailbox[1];<br>+ char mailbox[0];<br> };<br> <br> struct mwi_sub_task {<br>@@ -13167,7 +13167,7 @@<br> struct mwi_sub *mwi_sub;<br> struct mwi_sub_task *p = datap;<br> <br>- len = sizeof(*mwi_sub);<br>+ len = sizeof(*mwi_sub) + 1;<br> if (!ast_strlen_zero(p->mailbox))<br> len += strlen(p->mailbox);<br> <br>diff --git a/channels/Makefile b/channels/Makefile<br>index 6314279..49adb34 100644<br>--- a/channels/Makefile<br>+++ b/channels/Makefile<br>@@ -50,6 +50,9 @@<br> $(CHAN_DAHDI_OBJS): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,chan_dahdi)<br> <br> chan_mgcp.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br>+chan_unistim.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br>+chan_phone.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br>+chan_sip.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br> <br> chan_misdn.o: _ASTCFLAGS+=-Imisdn<br> <br>diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c<br>index 8669267..6870e67 100644<br>--- a/channels/chan_dahdi.c<br>+++ b/channels/chan_dahdi.c<br>@@ -1864,7 +1864,7 @@<br> */<br> static void dahdi_ami_channel_event(struct dahdi_pvt *p, struct ast_channel *chan)<br> {<br>- char ch_name[20];<br>+ char ch_name[23];<br> <br> if (p->channel < CHAN_PSEUDO) {<br> /* No B channel */<br>diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c<br>index 97cbe73..00c0b56 100644<br>--- a/channels/chan_iax2.c<br>+++ b/channels/chan_iax2.c<br>@@ -14319,7 +14319,7 @@<br> static int iax2_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)<br> {<br> char odata[256];<br>- char req[256];<br>+ char req[263];<br> char *ncontext;<br> struct iax2_dpcache *dp = NULL;<br> struct ast_app *dial = NULL;<br>diff --git a/channels/chan_sip.c b/channels/chan_sip.c<br>index 4e65c7b..26a32e6 100644<br>--- a/channels/chan_sip.c<br>+++ b/channels/chan_sip.c<br>@@ -11841,7 +11841,7 @@<br> int start = 0;<br> <br> for (;;) {<br>- char new[512];<br>+ char new[535];<br> const char *oh = __get_header(orig, field, &start);<br> <br> if (ast_strlen_zero(oh))<br>@@ -14527,7 +14527,7 @@<br> struct ast_party_id diverting_from;<br> const char *reason;<br> const char *quote_str;<br>- char header_text[256];<br>+ char header_text[538];<br> char encoded_number[SIPBUFSIZE/2];<br> <br> /* We skip this entirely if the configuration doesn't allow diversion headers */<br>@@ -17291,7 +17291,7 @@<br> {<br> char a2[256];<br> char a2_hash[256];<br>- char resp[256];<br>+ char resp[513];<br> <br> snprintf(a2, sizeof(a2), "%s:%s", sip_methods[sipmethod].text,<br> S_OR(keys[K_URI].s, uri));<br>@@ -22867,10 +22867,10 @@<br> static int build_reply_digest(struct sip_pvt *p, int method, char* digest, int digest_len)<br> {<br> char a1[256];<br>- char a2[256];<br>+ char a2[257];<br> char a1_hash[256];<br> char a2_hash[256];<br>- char resp[256];<br>+ char resp[607];<br> char resp_hash[256];<br> char uri[256];<br> char opaque[256] = "";<br>@@ -35001,21 +35001,22 @@<br> struct ast_str *overflow;<br> struct {<br> char **fragments;<br>+ size_t fragment_count;<br> char **expected;<br> int num_expected;<br> const char *description;<br> } tests[] = {<br>- { normal, normal, 1, "normal" },<br>- { fragmented, normal, 1, "fragmented" },<br>- { fragmented_body, normal, 1, "fragmented_body" },<br>- { multi_fragment, normal, 1, "multi_fragment" },<br>- { multi_message, multi_message_divided, 2, "multi_message" },<br>- { multi_message_body, multi_message_body_divided, 2, "multi_message_body" },<br>- { multi_message_in_fragments, multi_message_divided, 2, "multi_message_in_fragments" },<br>- { compact, compact, 1, "compact" },<br>- { faux, faux, 1, "faux" },<br>- { folded, folded, 1, "folded" },<br>- { cl_in_body, cl_in_body, 1, "cl_in_body" },<br>+ { normal, ARRAY_LEN(normal), normal, 1, "normal" },<br>+ { fragmented, ARRAY_LEN(fragmented), normal, 1, "fragmented" },<br>+ { fragmented_body, ARRAY_LEN(fragmented_body), normal, 1, "fragmented_body" },<br>+ { multi_fragment, ARRAY_LEN(multi_fragment), normal, 1, "multi_fragment" },<br>+ { multi_message, ARRAY_LEN(multi_message), multi_message_divided, 2, "multi_message" },<br>+ { multi_message_body, ARRAY_LEN(multi_message_body), multi_message_body_divided, 2, "multi_message_body" },<br>+ { multi_message_in_fragments, ARRAY_LEN(multi_message_in_fragments), multi_message_divided, 2, "multi_message_in_fragments" },<br>+ { compact, ARRAY_LEN(compact), compact, 1, "compact" },<br>+ { faux, ARRAY_LEN(faux), faux, 1, "faux" },<br>+ { folded, ARRAY_LEN(folded), folded, 1, "folded" },<br>+ { cl_in_body, ARRAY_LEN(cl_in_body), cl_in_body, 1, "cl_in_body" },<br> };<br> int i;<br> enum ast_test_result_state res = AST_TEST_PASS;<br>@@ -35043,7 +35044,7 @@<br> }<br> for (i = 0; i < ARRAY_LEN(tests); ++i) {<br> int num_messages = 0;<br>- if (mock_tcp_loop(tests[i].fragments, ARRAY_LEN(tests[i].fragments),<br>+ if (mock_tcp_loop(tests[i].fragments, tests[i].fragment_count,<br> &overflow, tests[i].expected, &num_messages, test)) {<br> ast_test_status_update(test, "Failed to parse message '%s'\n", tests[i].description);<br> res = AST_TEST_FAIL;<br>diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c<br>index 97634bc..244cd7c 100644<br>--- a/channels/chan_skinny.c<br>+++ b/channels/chan_skinny.c<br>@@ -3709,49 +3709,49 @@<br> int posn = 0;<br> <br> ptr = dbgcli_buf;<br>- strncpy(ptr, "\0", 1);<br>+ ptr[0] = '\0';<br> if (skinnydebug & DEBUG_GENERAL) {<br>- strncpy(ptr, "general ", 8);<br>+ strcpy(ptr, "general "); /* SAFE */<br> posn += 8;<br> ptr += 8;<br> }<br> if (skinnydebug & DEBUG_SUB) {<br>- strncpy(ptr, "sub ", 4);<br>+ strcpy(ptr, "sub "); /* SAFE */<br> posn += 4;<br> ptr += 4;<br> }<br> if (skinnydebug & DEBUG_AUDIO) {<br>- strncpy(ptr, "audio ", 6);<br>+ strcpy(ptr, "audio "); /* SAFE */<br> posn += 6;<br> ptr += 6;<br> }<br> if (skinnydebug & DEBUG_PACKET) {<br>- strncpy(ptr, "packet ", 7);<br>+ strcpy(ptr, "packet "); /* SAFE */<br> posn += 7;<br> ptr += 7;<br> }<br> if (skinnydebug & DEBUG_LOCK) {<br>- strncpy(ptr, "lock ", 5);<br>+ strcpy(ptr, "lock "); /* SAFE */<br> posn += 5;<br> ptr += 5;<br> }<br> if (skinnydebug & DEBUG_TEMPLATE) {<br>- strncpy(ptr, "template ", 9);<br>+ strcpy(ptr, "template "); /* SAFE */<br> posn += 9;<br> ptr += 9;<br> }<br> if (skinnydebug & DEBUG_THREAD) {<br>- strncpy(ptr, "thread ", 7);<br>+ strcpy(ptr, "thread "); /* SAFE */<br> posn += 7;<br> ptr += 7;<br> }<br> if (skinnydebug & DEBUG_HINT) {<br>- strncpy(ptr, "hint ", 5);<br>+ strcpy(ptr, "hint "); /* SAFE */<br> posn += 5;<br> ptr += 5;<br> }<br> if (skinnydebug & DEBUG_KEEPALIVE) {<br>- strncpy(ptr, "keepalive ", 10);<br>+ strcpy(ptr, "keepalive "); /* SAFE */<br> posn += 10;<br> ptr += 10;<br> }<br>@@ -6430,7 +6430,7 @@<br> case STIMULUS_CALLPARK:<br> {<br> char extout[AST_MAX_EXTENSION];<br>- char message[32];<br>+ char message[96];<br> RAII_VAR(struct ast_bridge_channel *, bridge_channel, NULL, ao2_cleanup);<br> SKINNY_DEBUG(DEBUG_PACKET, 3, "Received STIMULUS_CALLPARK from %s, inst %d, callref %d\n",<br> d->name, instance, callreference);<br>@@ -7183,7 +7183,7 @@<br> case SOFTKEY_PARK:<br> {<br> char extout[AST_MAX_EXTENSION];<br>- char message[32];<br>+ char message[96];<br> RAII_VAR(struct ast_bridge_channel *, bridge_channel, NULL, ao2_cleanup);<br> SKINNY_DEBUG(DEBUG_PACKET, 3, "Received SOFTKEY_PARK from %s, inst %d, callref %d\n",<br> d->name, instance, callreference);<br>diff --git a/channels/iax2/parser.c b/channels/iax2/parser.c<br>index c003a82..ec7226e 100644<br>--- a/channels/iax2/parser.c<br>+++ b/channels/iax2/parser.c<br>@@ -417,7 +417,7 @@<br> int x;<br> int found;<br> char interp[1024];<br>- char tmp[1024];<br>+ char tmp[1046];<br> <br> if (len < 2)<br> return;<br>diff --git a/configure b/configure<br>index ad6b9ab..0e6e871 100755<br>--- a/configure<br>+++ b/configure<br>@@ -686,6 +686,7 @@<br> AST_RPATH<br> AST_NATIVE_ARCH<br> AST_SHADOW_WARNINGS<br>+AST_NO_STRINGOP_TRUNCATION<br> AST_NO_FORMAT_TRUNCATION<br> AST_NO_STRICT_OVERFLOW<br> AST_FORTIFY_SOURCE<br>@@ -18611,6 +18612,19 @@<br> fi<br> <br> <br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wno-stringop-truncation" >&5<br>+$as_echo_n "checking for -Wno-stringop-truncation... " >&6; }<br>+if $(${CC} -Wno-stringop-truncation -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then<br>+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>+$as_echo "yes" >&6; }<br>+ AST_NO_STRINGOP_TRUNCATION=-Wno-stringop-truncation<br>+else<br>+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+ AST_NO_STRINGOP_TRUNCATION=<br>+fi<br>+<br>+<br> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wshadow" >&5<br> $as_echo_n "checking for -Wshadow... " >&6; }<br> if $(${CC} -Wshadow -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then<br>diff --git a/configure.ac b/configure.ac<br>index 8d798a7..f8f9ca1 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -1277,6 +1277,16 @@<br> fi<br> AC_SUBST(AST_NO_FORMAT_TRUNCATION)<br> <br>+AC_MSG_CHECKING(for -Wno-stringop-truncation)<br>+if $(${CC} -Wno-stringop-truncation -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then<br>+ AC_MSG_RESULT(yes)<br>+ AST_NO_STRINGOP_TRUNCATION=-Wno-stringop-truncation<br>+else<br>+ AC_MSG_RESULT(no)<br>+ AST_NO_STRINGOP_TRUNCATION=<br>+fi<br>+AC_SUBST(AST_NO_STRINGOP_TRUNCATION)<br>+<br> AC_MSG_CHECKING(for -Wshadow)<br> if $(${CC} -Wshadow -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then<br> AC_MSG_RESULT(yes)<br>diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c<br>index 5c6439b..cc96490 100644<br>--- a/funcs/func_groupcount.c<br>+++ b/funcs/func_groupcount.c<br>@@ -243,7 +243,7 @@<br> char *data, char *buf, size_t len)<br> {<br> struct ast_group_info *gi = NULL;<br>- char tmp1[1024] = "";<br>+ char tmp1[1026] = "";<br> char tmp2[1024] = "";<br> <br> if (!chan)<br>diff --git a/main/config.c b/main/config.c<br>index 1cb5bbe..3f6fa9d 100644<br>--- a/main/config.c<br>+++ b/main/config.c<br>@@ -1738,7 +1738,8 @@<br> char *c;<br> char *cur = buf;<br> struct ast_variable *v;<br>- char cmd[512], exec_file[512];<br>+ char cmd[520];<br>+ char exec_file[512];<br> <br> /* Actually parse the entry */<br> if (cur[0] == '[') { /* A category header */<br>diff --git a/main/manager.c b/main/manager.c<br>index 1e60003..92162c6 100644<br>--- a/main/manager.c<br>+++ b/main/manager.c<br>@@ -7989,7 +7989,7 @@<br> /* compute the expected response to compare with what we received */<br> {<br> char a2[256];<br>- char a2_hash[256];<br>+ char a2_hash[33];<br> char resp[256];<br> <br> /* XXX Now request method are hardcoded in A2 */<br>diff --git a/main/pbx.c b/main/pbx.c<br>index b4599de..bcfd42d 100644<br>--- a/main/pbx.c<br>+++ b/main/pbx.c<br>@@ -6165,7 +6165,7 @@<br> char *last_presence_message;<br> <br> AST_LIST_ENTRY(store_hint) list;<br>- char data[1];<br>+ char data[0];<br> };<br> <br> AST_LIST_HEAD_NOLOCK(store_hints, store_hint);<br>diff --git a/makeopts.in b/makeopts.in<br>index bedd2fa..6683d6e 100644<br>--- a/makeopts.in<br>+++ b/makeopts.in<br>@@ -119,6 +119,7 @@<br> AST_TRAMPOLINES=@AST_TRAMPOLINES@<br> AST_NO_STRICT_OVERFLOW=@AST_NO_STRICT_OVERFLOW@<br> AST_NO_FORMAT_TRUNCATION=@AST_NO_FORMAT_TRUNCATION@<br>+AST_NO_STRINGOP_TRUNCATION=@AST_NO_STRINGOP_TRUNCATION@<br> AST_SHADOW_WARNINGS=@AST_SHADOW_WARNINGS@<br> AST_NESTED_FUNCTIONS=@AST_NESTED_FUNCTIONS@<br> AST_CLANG_BLOCKS=@AST_CLANG_BLOCKS@<br>diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c<br>index 9ca0dfb..daa7d71 100644<br>--- a/pbx/dundi-parser.c<br>+++ b/pbx/dundi-parser.c<br>@@ -388,7 +388,7 @@<br> int x;<br> int found;<br> char interp[1024];<br>- char tmp[1024];<br>+ char tmp[1051];<br> if (len < 2)<br> return;<br> while(len >= 2) {<br>diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c<br>index 7ec144d..2e3c393 100644<br>--- a/pbx/pbx_dundi.c<br>+++ b/pbx/pbx_dundi.c<br>@@ -1239,7 +1239,7 @@<br> <br> static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, uint32_t crc, int *lowexpiration)<br> {<br>- char key[256];<br>+ char key[382];<br> char eid_str[20];<br> char eidroot_str[20];<br> time_t now;<br>diff --git a/res/Makefile b/res/Makefile<br>index 5a8f35a..4865883 100644<br>--- a/res/Makefile<br>+++ b/res/Makefile<br>@@ -29,7 +29,7 @@<br> res_config_ldap.o: _ASTCFLAGS+=-DLDAP_DEPRECATED<br> <br> ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h<br>-ael/ael_lex.o: _ASTCFLAGS+=-I. -Iael -Wno-unused<br>+ael/ael_lex.o: _ASTCFLAGS+=-I. -Iael -Wno-unused $(AST_NO_FORMAT_TRUNCATION)<br> <br> ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h<br> ael/ael.tab.o: _ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0<br>@@ -95,5 +95,7 @@<br> res_stasis_recording.so: stasis_recording/stored.o<br> stasis_recording/stored.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_stasis_recording)<br> <br>+res_parking.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)<br>+<br> # Dependencies for res_ari_*.so are generated, so they're in this file<br> include ari.make<br>diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c<br>index e3935e0..8e12a3e 100644<br>--- a/res/res_config_ldap.c<br>+++ b/res/res_config_ldap.c<br>@@ -1961,7 +1961,8 @@<br> */<br> static char *realtime_ldap_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)<br> {<br>- char status[256], credentials[100] = "";<br>+ char status[1047];<br>+ char credentials[sizeof(user) + 15] = "";<br> int ctimesec = time(NULL) - connect_time;<br> <br> switch (cmd) {<br>diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c<br>index 17bcd90..d0b12e3 100644<br>--- a/res/res_musiconhold.c<br>+++ b/res/res_musiconhold.c<br>@@ -1105,7 +1105,7 @@<br> <br> DIR *files_DIR;<br> struct dirent *files_dirent;<br>- char dir_path[PATH_MAX];<br>+ char dir_path[PATH_MAX - 256];<br> char filepath[PATH_MAX];<br> char *ext;<br> struct stat statbuf;<br>diff --git a/tests/Makefile b/tests/Makefile<br>index a65b88b..8ce37ff 100644<br>--- a/tests/Makefile<br>+++ b/tests/Makefile<br>@@ -18,3 +18,5 @@<br> all: _all<br> <br> include $(ASTTOPDIR)/Makefile.moddir_rules<br>+<br>+test_strings.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) $(AST_NO_STRINGOP_TRUNCATION)<br>diff --git a/tests/test_voicemail_api.c b/tests/test_voicemail_api.c<br>index 188db4a..5d5ff15 100644<br>--- a/tests/test_voicemail_api.c<br>+++ b/tests/test_voicemail_api.c<br>@@ -447,7 +447,7 @@<br> static int test_vm_api_create_voicemail_files(const char *context, const char *mailbox, struct ast_vm_msg_snapshot *snapshot)<br> {<br> FILE *msg_file;<br>- char folder_path[PATH_MAX];<br>+ char folder_path[PATH_MAX - 12];<br> char msg_path[PATH_MAX];<br> char snd_path[PATH_MAX];<br> char beep_path[PATH_MAX];<br>@@ -540,7 +540,7 @@<br> {<br> char msg_path[PATH_MAX];<br> char snd_path[PATH_MAX];<br>- char folder_path[PATH_MAX];<br>+ char folder_path[PATH_MAX - 12];<br> <br> if (!snapshot) {<br> return;<br>diff --git a/utils/Makefile b/utils/Makefile<br>index cabc268..0a3baec 100644<br>--- a/utils/Makefile<br>+++ b/utils/Makefile<br>@@ -157,7 +157,7 @@<br> $(CMD_PREFIX) sed 's/ast_debug([[:digit:]][[:digit:]]*/ast_log(LOG_DEBUG/' "$@" > "$@.new"<br> $(CMD_PREFIX) mv "$@.new" "$@"<br> <br>-aelparse.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res -Wno-unused<br>+aelparse.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res -Wno-unused $(AST_NO_FORMAT_TRUNCATION)<br> aelparse: LIBS+=-lm $(AST_CLANG_BLOCKS_LIBS)<br> aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o lock.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o<br> <br>diff --git a/utils/ael_main.c b/utils/ael_main.c<br>index 0c6ec03..6c83746 100644<br>--- a/utils/ael_main.c<br>+++ b/utils/ael_main.c<br>@@ -381,7 +381,7 @@<br> if( dump_extensions ) {<br> struct namelist *x;<br> x = create_name((char*)value);<br>- strncpy(x->name2,data,100);<br>+ strncpy(x->name2, data, 99);<br> if( eval ) {<br> <br> ADD_LAST(con->switches,x);<br>diff --git a/utils/astman.c b/utils/astman.c<br>index 2ea68b9..d889999 100644<br>--- a/utils/astman.c<br>+++ b/utils/astman.c<br>@@ -544,7 +544,7 @@<br> char dest[256];<br> struct message *m;<br> char channame[256];<br>- char tmp[80];<br>+ char tmp[280];<br> char *context;<br> <br> chan = newtListboxGetCurrent(c);<br>diff --git a/utils/db1-ast/hash/ndbm.c b/utils/db1-ast/hash/ndbm.c<br>index d702f73..16202ed 100644<br>--- a/utils/db1-ast/hash/ndbm.c<br>+++ b/utils/db1-ast/hash/ndbm.c<br>@@ -79,7 +79,7 @@<br> info.cachesize = 0;<br> info.hash = NULL;<br> info.lorder = 0;<br>- (void)strncpy(path, file, len - 1);<br>+ (void)strcpy(path, file); /* SAFE */<br> (void)strncat(path, DBM_SUFFIX, len - strlen(path) - 1);<br> db = (DBM *)__hash_open(path, flags, mode, &info, 0);<br> #ifndef __GNUC__<br>diff --git a/utils/extconf.c b/utils/extconf.c<br>index 97cfaa9..0007c01 100644<br>--- a/utils/extconf.c<br>+++ b/utils/extconf.c<br>@@ -3180,7 +3180,8 @@<br> char *c;<br> char *cur = buf;<br> struct ast_variable *v;<br>- char cmd[512], exec_file[512];<br>+ char cmd[520];<br>+ char exec_file[512];<br> int object, do_exec, do_include;<br> <br> /* Actually parse the entry */<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8936">change 8936</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8936"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84 </div>
<div style="display:none"> Gerrit-Change-Number: 8936 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>