aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-03-24 14:26:39 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-03-24 14:27:19 +0100
commit56f223d8d11fea94abf714a8a55550e876847722 (patch)
tree311bb3433a69dbe1de3ebff39d0f9f651fda77d7
parent5d376845bb2c6e2306f9fb30863d3ffadccfb166 (diff)
Fix: left shift cannot be repesented in type int
Caught by ASan: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: I30aed795d027dc063f06e08c8455bad2dd92cf24
-rw-r--r--src/pcu_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index c2de92c6..abc3d8db 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -239,7 +239,7 @@ static int config_write_pcu(struct vty *vty)
vty_out(vty, " pcu-socket %s%s", the_pcu->pcu_sock_path, VTY_NEWLINE);
for (i = 0; i < 32; i++) {
- unsigned int cs = (1 << i);
+ uint32_t cs = ((uint32_t)1 << i);
if (the_pcu->gsmtap_categ_mask & cs) {
vty_out(vty, " gsmtap-category %s%s",
get_value_string(pcu_gsmtap_categ_names, i), VTY_NEWLINE);