Project

General

Profile

Bug #3023

src/common/pcu_sock.c/pcu_sock_close(): The array 'ts->lchan' is being utilized as a pointer to single object

Added by fixeria 5 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/01/2018
Due date:
% Done:

0%

Estimated time:
Spec Reference:

Description

The gsm_bts_trx_ts struct has array of lchans:

struct gsm_lchan lchan[TS_MAX_LCHAN];

However, in the pcu_sock_close() it's utilized as a pointer to single object:

for (j = 0; j < 8; j++) {
    ts = &trx->ts[j];
    if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED
     && ts->pchan == GSM_PCHAN_PDCH) {
        ts->lchan->rel_act_kind = LCHAN_REL_ACT_PCU;
        l1sap_chan_rel(trx, gsm_lchan2chan_nr(ts->lchan));
    }
}

Is it intended?

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)