aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/compression
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-05-22 17:32:07 -0400
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-05-22 17:32:07 -0400
commit336292d2f38b9883e2002f1f1c89704b971d62a6 (patch)
tree3b7dbd60c11dd0fefb7881a51e50b1a3ae036f76 /src/core/lib/compression
parentb6c7a5ae5fd300359a21e2d454df75b4578b5f60 (diff)
parent93dd0470cf26aed445b40a8b9332e6b06f5e5514 (diff)
Merge pull request #6423 from ctiller/signal_handler
Fix some ubsan issues
Diffstat (limited to 'src/core/lib/compression')
-rw-r--r--src/core/lib/compression/compression_algorithm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/lib/compression/compression_algorithm.c b/src/core/lib/compression/compression_algorithm.c
index 7039364b7b..820871d579 100644
--- a/src/core/lib/compression/compression_algorithm.c
+++ b/src/core/lib/compression/compression_algorithm.c
@@ -199,5 +199,6 @@ void grpc_compression_options_disable_algorithm(
int grpc_compression_options_is_algorithm_enabled(
const grpc_compression_options *opts,
grpc_compression_algorithm algorithm) {
+ if (algorithm >= GRPC_COMPRESS_ALGORITHMS_COUNT) return 0;
return GPR_BITGET(opts->enabled_algorithms_bitset, algorithm);
}