Permalink
Browse files

Fixed FTBS with hardening flags enabled. (Alessio Treglia)

  • Loading branch information...
1 parent 7999642 commit c6a1fca516158c2e89588b6461a4aab02b3ff989 William Weston committed Jan 12, 2013
Showing with 7 additions and 6 deletions.
  1. +1 −0 ChangeLog
  2. +2 −2 configure.ac
  3. +1 −1 src/alsa_seq.c
  4. +2 −2 src/debug.c
  5. +1 −1 src/phasex.c
View
1 ChangeLog
@@ -30,6 +30,7 @@ Changelog:
* Fixed GUI param update race condition on updated flag.
* Fixed sporadic GUI param sensitivity update issue.
* Updated system synth-patches.
+ * Fixed FTBS with hardening flags enabled. (Alessio Treglia)
2012-12-28 William Weston <whw@linuxmail.org> - 0.14.96
View
4 configure.ac
@@ -650,11 +650,11 @@ case "$DEBUG_CFLAGS" in
;;
"yes")
DEBUG_CFLAGS="-g"
- OPT_CFLAGS="-pipe -Wall -Wcast-align -Wconversion -Wextra $ARCH_OPT_CFLAGS -m$ARCH_BITS $ARCH_MATH_CFLAGS -O2 -ffast-math -fsingle-precision-constant"
+ OPT_CFLAGS="-pipe -Wall -Wcast-align -Wconversion -Wextra -Werror=format-security $ARCH_OPT_CFLAGS -m$ARCH_BITS $ARCH_MATH_CFLAGS -O2 -ffast-math -fsingle-precision-constant"
;;
*)
DEBUG_CFLAGS="-g"
- OPT_CFLAGS="-pipe -Wall -Wcast-align -Wconversion -Wextra $ARCH_OPT_CFLAGS -m$ARCH_BITS $ARCH_MATH_CFLAGS -fsingle-precision-constant"
+ OPT_CFLAGS="-pipe -Wall -Wcast-align -Wconversion -Wextra -Werror=format-security $ARCH_OPT_CFLAGS -m$ARCH_BITS $ARCH_MATH_CFLAGS -fsingle-precision-constant"
;;
esac
View
2 src/alsa_seq.c
@@ -65,7 +65,7 @@ alsa_error_handler(const char *file, int line, const char *func, int err, const
{
PHASEX_ERROR("Unhandled ALSA error %d in function %s from file %s line %d:\n",
err, func, file, line);
- PHASEX_ERROR(fmt);
+ PHASEX_ERROR("%s", fmt);
}
View
4 src/debug.c
@@ -92,8 +92,8 @@ phasex_debug_thread(void *UNUSED(arg))
usleep(16000 >> PHASEX_CPU_POWER);
while (main_debug_queue.read_index !=
g_atomic_int_get(& (main_debug_queue.write_index))) {
- fprintf(stderr, (char *)(main_debug_queue.msgs
- [main_debug_queue.read_index].msg));
+ fprintf(stderr, "%s",
+ main_debug_queue.msgs[main_debug_queue.read_index].msg);
main_debug_queue.read_index =
(main_debug_queue.read_index + 1) & DEBUG_BUFFER_MASK;
}
View
2 src/phasex.c
@@ -391,7 +391,7 @@ phasex_shutdown(const char *msg)
{
/* output message from caller */
if (msg != NULL) {
- fprintf(stderr, msg);
+ fprintf(stderr, "%s", msg);
}
/* keep current midi port settings. */

0 comments on commit c6a1fca

Please sign in to comment.