Change in osmo-pcu[master]: csn1: Fix an infinite loop in CSN.1 dissector when having more than 2...

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.org
Fri Jan 24 17:36:59 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17000 )


Change subject: csn1: Fix an infinite loop in CSN.1 dissector when having more than 255 padding bits
......................................................................

csn1: Fix an infinite loop in CSN.1 dissector when having more than 255 padding bits

Port of wireshark.git 8b5aa913711b32b1e1bc707919d2a98c1875d443.

Change-Id: I7f6aecc2c0f300c1a77cd683652969d3f1aa5794
---
M src/csn1.cpp
M src/csn1.h
2 files changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/00/17000/1

diff --git a/src/csn1.cpp b/src/csn1.cpp
index 310b9f9..90daee9 100644
--- a/src/csn1.cpp
+++ b/src/csn1.cpp
@@ -1150,7 +1150,7 @@
         {
           while (remaining_bits_len > 0)
           {
-            guint8 bits_to_handle = remaining_bits_len%8;
+            guint bits_to_handle = remaining_bits_len%8;
             if (bits_to_handle > 0)
             {
 	      LOGPC(DCSN1, LOGL_NOTICE, "%" PRIu64 "|", bitvec_read_field(vector, &readIndex, bits_to_handle));
diff --git a/src/csn1.h b/src/csn1.h
index c5ee919..0da529c 100644
--- a/src/csn1.h
+++ b/src/csn1.h
@@ -56,6 +56,7 @@
 typedef signed int gint32;
 typedef signed short gint16;
 typedef int gint;
+typedef unsigned int guint;
 typedef gint gboolean;
 typedef unsigned char guint8;
 typedef unsigned short guint16;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17000
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I7f6aecc2c0f300c1a77cd683652969d3f1aa5794
Gerrit-Change-Number: 17000
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/20200124/f5f84f29/attachment.htm>


More information about the gerrit-log mailing list