diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-11-23 00:05:51 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-11-23 00:07:27 -0800 |
commit | 38286df5370dce0351a9afac6e2fac39b47ab1a3 (patch) | |
tree | 60958d3a72da6d375d24ffb4dfb058bf366e2615 /configure.ac | |
parent | b50a151346c42816034b5c26266eb753b7dbe737 (diff) | |
download | coreutils-38286df5370dce0351a9afac6e2fac39b47ab1a3.tar.gz |
pr: fix integer overflow in buffer size calcs
Problem reported by Marcel Böhme (Bug#24996).
* configure.ac (WERROR_CFLAGS): Avoid -Wtype-limits.
* src/pr.c (col_sep_string): Now a const pointer. All uses changed.
(integer_overflow): New function.
(separator_string, main, init_parameters, init_store_cols):
Check for integer overflow.
(align_column, read_line, print_stored): Avoid integer overflow.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a48460114..1e74b361f 100644 --- a/configure.ac +++ b/configure.ac @@ -132,6 +132,7 @@ if test "$gl_gcc_warnings" = yes; then nw="$nw -Wswitch-enum" # Too many warnings for now nw="$nw -Wswitch-default" # Too many warnings for now nw="$nw -Wstack-protector" # not worth working around + nw="$nw -Wtype-limits" # False alarms for portable code # things I might fix soon: nw="$nw -Wfloat-equal" # sort.c, seq.c nw="$nw -Wmissing-format-attribute" # copy.c @@ -150,6 +151,7 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([$w]) done gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now + gl_WARN_ADD([-Wno-type-limits]) # False alarms for portable code gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now gl_WARN_ADD([-Wno-format-nonliteral]) |