Project

General

Profile

Actions

Bug #4648

closed

subchan_demux.c:45:17: runtime error: index 320 out of bounds for type 'ubit_t [320]'

Added by laforge almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
-
Start date:
07/04/2020
Due date:
% Done:

100%

Spec Reference:

Description

while bringing up an InSite while using libosmo-abis with --enable-sanitize, I get:

subchan_demux.c:45:17: runtime error: index 320 out of bounds for type 'ubit_t [320]'

Not a major issue, particularly as the subchan_demux is not going to be used with omso-bsc/osmo-mgw (we have a new i460 mux implementation for that).

Actions #1

Updated by laforge almost 4 years ago

the problem is that
  • the buffer is 320 bytes (one bit per byte)
  • we always append two bits (from each 64k-byte)
  • only after having appended two bits, we try to achieve sync and then check if the buffer size has been reached

We could simply enlarge the buffer, but that would break ABI. Alternatively, we could check for sync/overflow after each bit.

Actions #2

Updated by laforge almost 4 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 80
Actions #3

Updated by laforge almost 4 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 80 to 100

patch merged

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)