Commit Graph

15 Commits

Author SHA1 Message Date
Andrey Volk a7477ed0e2 FS-11911: Fix build on Debian Buster 2019-07-15 22:23:25 +04:00
Sebastian Kemper 3ca75eb8ef FS-11783: [mod_say_ja] quiet overflow warning
With -Wformat-overflow gcc warns about calls to formatted input/output
function "sprintf" that might overflow the destination buffer.

In this case gcc does not know the upper bound of tm_min and assumes
that up to 11 bytes might be written to buffer (3 bytes). But we know
that tm_min can only be within the range 0 to 59.

mod_say_ja.c: In function 'ja_say_time':
mod_say_ja.c:376:35: error: '%d' directive writing between 2 and 10 bytes into a region of size 3 [-Werror=format-overflow=]
                  sprintf(buffer, "%d", tm.tm_min);
                                   ^~
mod_say_ja.c:376:34: note: directive argument in the range [11, 2147483647]
                  sprintf(buffer, "%d", tm.tm_min);
                                  ^~~~
mod_say_ja.c:376:18: note: 'sprintf' output between 3 and 11 bytes into a destination of size 3
                  sprintf(buffer, "%d", tm.tm_min);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This commits adds a hint for gcc, which silences the warning.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2019-04-14 19:23:52 +02:00
Andrey Volk 671da28796 FS-11263: [Build-System] Move FreeSWITCH build system to Visual Studio 2017 on Windows. 2018-07-24 07:21:55 +00:00
Andrey Volk d91374edde FS-11078: [Build-System] Add mod_say_(es_ar, fa, he, hr, hu, ja, pl, th) modules to the Windows build. 2018-07-24 07:21:44 +00:00
Hristo Trendev a8c5a0c87b add timezone support to mod_say_{de,es,ja,nl,th,zh}
This is nothing more than a shameless copy/paste from another mod_say
module, which already had timezone support. It simply checks if the
timezone variable is set and if it contains a valid timezone, then this
timezone will be used when announcing times/dates.

FS-7048 #resolve
2014-12-02 17:08:12 +01:00
Michael Jerris 95d4d0031c don't set variable we don't use, and fix off by 1 buffer overflow in 1 case 2014-04-28 14:46:05 -04:00
Michael Jerris dbaf49926c remove unnecessary null check, we would have crashed already if that strdup failed 2014-04-28 14:38:38 -04:00
Michael Jerris bcd9f49fbe move applications to use automake 2014-03-07 18:36:12 -05:00
Ken Rice 6e7d5d0897 update copyright header for 2014 2014-02-12 12:08:56 -06:00
Nathan Neulinger 32adc789f6 make noexpandtab explicit in all vim modelines other than xml files 2013-06-25 11:50:17 -05:00
Ken Rice 7a147e4762 Update a ton of copyright statements to make sure the dates are proper 2012-04-25 17:14:55 -05:00
Jeff Lenk aeb446a1cb FS-3201 make changes similar to en support 2011-03-30 14:55:06 -05:00
Jeff Lenk cfe087ec57 FS-3202 2011-03-29 13:09:15 -05:00
Jeff Lenk 06bccf2801 FS-3202 2011-03-29 12:08:07 -05:00
Brian West b24231587c FS-2755 2010-10-05 10:12:28 -05:00