Project

General

Profile

Bug #4648

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

Added by laforge 7 months ago. Updated 7 months 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).

History

#1 Updated by laforge 7 months 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.

#2 Updated by laforge 7 months ago

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

#3 Updated by laforge 7 months ago

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

patch merged

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)