This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/20573 )
Change subject: vty: Fix left shifting out of range on signed variable
......................................................................
vty: Fix left shifting out of range on signed variable
Fixes following ASan runtime errors while running vty tests:
src/vty/command.c:3088:27: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
src/vty/command.c:3136:23: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Change-Id: Ie11ff18d6fd9f6e1e91a51b6156fb6b0b7d3a9a8
---
M src/vty/command.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/20573/1
diff --git a/src/vty/command.c b/src/vty/command.c
index fae925e..d8649f5 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -3085,7 +3085,7 @@
continue;
if (cmd->attr & (CMD_ATTR_DEPRECATED | CMD_ATTR_HIDDEN))
continue;
- if (~cmd->usrattr & (1 << f))
+ if (~cmd->usrattr & ((unsigned)1 << f))
continue;
if (cmd->attr & CMD_ATTR_LIB_COMMAND)
@@ -3133,9 +3133,9 @@
unsigned int f;
for (f = 0; f < VTY_CMD_USR_ATTR_NUM; f++) {
- if (~flag_mask & (1 << f))
+ if (~flag_mask & ((unsigned)1 << f))
continue;
- if (~cmd->usrattr & (1 << f)) {
+ if (~cmd->usrattr & ((unsigned)1 << f)) {
*(ptr++) = '.';
continue;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/20573
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie11ff18d6fd9f6e1e91a51b6156fb6b0b7d3a9a8
Gerrit-Change-Number: 20573
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201012/087c040b/attachment.htm>