summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gsm0480: fix USSD OCTET STRING length confusionVadim Yanitskiy2018-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | According to the GSM 04.80 (version 5.0.0) specification Annex A "Expanded ASN.1 Module "SS-Protocol", the maximum size of a USSD OCTET STRING is 160 bytes. Thus according to ETSI TS 123 038 (version 10.0.0) specification 6.1.2.3 "USSD packing of 7 bit characters", in 160 octets, it's possible to pack (160 * 8) / 7 = 182.8, that is 182 characters. The remaining 6 bits are set to zero. This change defines both mentioned values: - GSM0480_USSD_OCTET_STRING_LEN 160 - GSM0480_USSD_7BIT_STRING_LEN 182 keeping the old MAX_LEN_USSD_STRING 'as is' due to compatibility reasons. Now the new value is used for ss_request structure, while old one is still used for deprecated ussd_request structure. Change-Id: I6dead74f9ecea079752ff2400cdaf7c30187784e
* gsm0480: skip length check for 'RELEASE COMPLETE' messageSergey Kostanbaev2018-01-171-3/+10
| | | | | | | | According to GSM 04.80 Section 2.5 'Release complete' Table 2.5, the 'RELEASE COMPLETE' message payload is optional, so let's drop the length check in gsm0480_decode_ss_request() for this type. Change-Id: I63b7f8ce403169a9dbdbdb031db16693de2196d6
* Log lapd_datalink state on errorsMax2018-01-161-5/+5
| | | | | | | It's not very useful to get just the raw pointer address in case of lapd_datalink receive error. Log it's state in addition. Change-Id: Ie8c5df262312f886f509113f2707e36811df3bd5
* libosmocodec: implement ECU (Error Concealment Unit) for FRPhilipp Maier2018-01-152-1/+166
| | | | | | | | | | | When a bad GSM voice frame is received, it's being replaced by a silence frame. This may cause unpleasant audio effects. This change implements a functionality to craft a replacement frame from the last known good frame. Currently, only FR is supported, support for other codecs may be added latter. Change-Id: I06a21f60db01bfe1c2b838f93866fad1d53fdcd1
* logging-gsmtap: send only basename of source fileNeels Hofmeyr2018-01-121-0/+5
| | | | | | | | | | | GSMTAP doesn't have a lot of space for the source file name. It is better to send only the basename of the file, because only the first bit of a long path may not convey the source file at all, needing guess work from the line number. Before: "Source File Name: ../../../../src/libosmocore/src" After: "Source File Name: telnet_interface.c" Change-Id: Ie8fc9e782bcf8fa6e2e957d02e7d73c3a7c2bca8
* Allow multiple 'log gsmtap' sinksMax2018-01-121-2/+9
| | | | | | | | Previously we've checked for existing log target with a given hostname from vty code but it was ignored inside the check so only the very first 'log gsmtap' entry was enabled while the rest were silently ignored. Change-Id: I8fd8bda9e07d403a54735da30addb742e56538a2
* log: print loginfo assertions sourceMax2018-01-121-8/+8
| | | | | | | Print which function has triggered assert_loginfo(). It's handy in debugging logging-related issues in libosmocore. Change-Id: I8418d0c431106f50aa8779cd89396f02373304ad
* TLVP_PRESENT() should not return TRUE after tlv_parse() fails.Stefan Sperling2018-01-121-4/+10
| | | | | | | | | | | | If the length provided in the patcket exceeds the buffer length, tlv_parse() returns -2 but leaves tlv.val and tlv.len initializd. Many callers of tlv_parse() do not check its return value, but rely on TLVP_PRESENT() to see if a particular TLV was parsed successfully. By clearing tlv.val and tlv.len we make it less likely that those callers will use an overlong TLV length value. Change-Id: I4dda6938e1650b4bcaac45809a4763f86f5a9794
* gsm: add gsm0808_speech_codec_type_namesNeels Hofmeyr2018-01-122-0/+15
| | | | | | | Used for logging Speech Codec List entries in osmo-bsc, during handover decision. Change-Id: Ie6418d16db333188e9bcd2b32b7216f277ae8832
* Use existing function for TLLI encodingMax2018-01-082-15/+5
| | | | | | Use bssgp_msgb_tlli_put() instead of copy-pasted code. Change-Id: I06d60566a19dcae701f8648c19fbd8db6d586f77
* Add function to properly encode RAIMax2018-01-085-46/+44
| | | | | | | | | | | | | Add gsm48_encode_ra() which takes appropriate struct as [out] parameter instead of generic buffer. Using uint8_t buffer instead of proper struct type prooved to be error-prone - see Coverity CID57877, CID57876. Old gsm48_construct_ra() is made into tiny wrapper around new function. The test output is adjusted because of the change in function return value which was constant and hence ignored anyway. Related: OS#1640 Change-Id: I31f9605277f4945f207c2c44ff82e62399f8db74
* coding: move eB adjustement to appropriate placeMax2018-01-051-7/+2
| | | | | | | | | | As a leftover from code move from OsmoBTS we have eB adjustement outside of eB check in gsm0503_tch_burst_map() which is rightfully noted by Coverity. Let's fix this by moving the adjustement under the corresponding if. Change-Id: I385cd6ffea4d13ef911910fc87c92b73809888a2 Fixes: CID57691
* Use 127.0.0.1 for GSMTAP logging by defaultMax2018-01-051-3/+3
| | | | | | | | | | | | | | | Previously the were no default value provided in case of unspecified hostname in "log gsmtap" vty config. This leads to confusing log messages because NULL was used as a hostname: Inconsistent indentation -- leading whitespace must match adjacent lines, and indentation must reflect child node levels. A mix of tabs and spaces is allowed, but their sequence must not change within a child block. Fix this by using 127.0.0.1 as default log destination and logging hostname in case of errors. Related: OS#2608 Change-Id: I58b1d4ec522af18024be2e56c9103b3db7936813
* CTRL: Ensure peer/connection info is always printed the same wayHarald Welte2017-12-221-6/+6
| | | | | | | | | Now that we use osmo_sock_get_name() to print connection information at disconnect, let's use the same also at accept() time. Furthermore, let's call it CTRL connection everywhere for consistency. Change-Id: I33ee7d0ed853c5b2a4ae4e8ef945f8f27753cdea
* control_if: Log the disconnect of a CTRL clientHarald Welte2017-12-221-1/+4
| | | | | | | We are logging new CTRL connections at LOGL_INFO, so we should also log disconnects for symmetry. Change-Id: Id30aa76a5a3dab32d6b4121ce6fdf56d71dfc2ba
* control_if: Close control connection socket/fd on read/write == 0Harald Welte2017-12-221-1/+9
| | | | | | | | | | | When read() or write() system calls return '0' on a stream socket, it means that the connection has been closed ("EOF"). We must accordingly close this socket and remove all related state. Before this patch, every new CTRL connection would introduce a leak of both some memory/state, as well as a file descriptor :( Change-Id: I4fb70e5f123b37dece29f156c5f430c875e7cbaf
* timer: fixup whitespace issuesHarald Welte2017-12-221-3/+3
| | | | Change-Id: Ic0c8fc407a45ff4b0d3da1d3e4fdf8885b5bca9b
* ctrl: separate handling of GET_REPLY, SET_REPLY and TRAPNeels Hofmeyr2017-12-201-25/+28
| | | | | | | So far, error reporting just says "Trap/Reply", more accurately report 'GET REPLY', 'SET REPLY' and 'TRAP' as appropriate. Change-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01
* ctrl: tighten CTRL input parsingNeels Hofmeyr2017-12-201-7/+70
| | | | | | | | | | | | | | | | Validate that incoming CTRL commands... - have decimal IDs, - return error on trailing characters, - have invalid characters in variable identifiers, - send detailed error messages as reply to the requestor. Adjust ctrl_test.{c,ok}, which best show the change in behavior. Message handling causes log messages on stderr; previously, stderr was empty. Add '[ignore]' in testsuite.at so that the nonempty stderr doesn't cause test failures. Change-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1
* rate_ctr: fix osmo-sgsn DoS: don't return NULL on already used indexNeels Hofmeyr2017-12-201-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent patch I563764af1d28043e909234ebb048239125ce6ecd introduced returning NULL from rate_ctr_group_alloc() when the index passed already exists. Instead of returning NULL, find an unused group index and use that, adjust the error message. In stats_test.c, adjust, and also assert allocated counter group indexes everywhere. Rationale: The original patch causes osmo-sgsn to crash as soon as the second subscriber attempts to establish an MM context. Of course osmo-sgsn is wrong to a) fail to check a NULL return value and crash and b) to fail to allocate an MM context just because the rate counter group could not be allocated (it still rejects the MM context completely if rate_ctr_group_alloc() fails). Nevertheless, the price we pay for rate counter correctness is, at least in this instance, way too high: osmo-sgsn becomes completely unusable for more than one subscriber. Numerous other places exist where rate_ctr_group_alloc() is called with a constant index number; from a quick grep magic I found these possible breaking points: osmo-sgsn/src/gprs/gb_proxy.c:1431: cfg->ctrg = rate_ctr_group_alloc(tall_bsc_ctx, &global_ctrg_desc, 0); osmo-sgsn/src/gprs/gprs_sgsn.c:139: sgsn->rate_ctrs = rate_ctr_group_alloc(tall_bsc_ctx, &sgsn_ctrg_desc, 0); osmo-sgsn/src/gprs/gprs_sgsn.c:270: ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, 0); osmo-sgsn/src/gprs/gtphub.c:888: b->counters_io = rate_ctr_group_alloc(osmo_gtphub_ctx, &gtphub_ctrg_io_desc, 0); osmo-bsc/src/libfilter/bsc_msg_acc.c:87: lst->stats = rate_ctr_group_alloc(lst, &bsc_cfg_acc_list_desc, 0); osmo-pcu/src/bts.cpp:228: m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:793: tbf->m_ctrs = rate_ctr_group_alloc(tbf, &tbf_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:879: tbf->m_ul_egprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_ul_egprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:880: tbf->m_ul_gprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_ul_gprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:970: tbf->m_dl_egprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_dl_egprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:977: tbf->m_dl_gprs_ctrs = rate_ctr_group_alloc(tbf, &tbf_dl_gprs_ctrg_desc, 0); osmo-pcu/src/tbf.cpp:1475: ul_tbf->m_ctrs = rate_ctr_group_alloc(ul_tbf, &tbf_ctrg_desc, 0); osmo-pcu/src/bts.cpp:226: m_ratectrs = rate_ctr_group_alloc(tall_pcu_ctx, &bts_ctrg_desc, 1); We can fix all of these callers and then reconsider returning NULL, but IMO even into the future, rate counter group indexes are not something worth failing to provide service for. For future bugs we should keep the automatic index picking in case of index collisions. We will get an error message barfed and can fix the issue in our own time, while the application remains completely usable, and even the rate counters can still be queried (at wrong indexes, but life is tough). Related: I49aa95b610f2faec52dede2e4816da47ca1dfb14 (osmo-sgsn's segfault) Change-Id: Iba6e41b8eeaea5ff6ed862bab3f34a62ab976914
* ctrl: on parse errors, return a detailed message to senderNeels Hofmeyr2017-12-181-11/+23
| | | | | | | | | | | The recently added ctrl_cmd_parse2() returns non-NULL cmd with error messages upon parsing errors. In handle_control_read(), use ctrl_cmd_parse2() and send those back to the CTRL command sender as reply. Retain the previous "Command parser error" reply only in case ctrl_cmd_parse2() should return NULL, which shouldn't actually happen at all. Change-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d
* add ctrl_cmd_parse2() to return parsing errorsNeels Hofmeyr2017-12-181-2/+16
| | | | | | | | | | | | | | | | | | | | | If a control command fails to parse, we so far discard specific error messages and instead send just "Command parser error". In ctrl_cmd_parse() we actually compose detailed error replies, but in the end simply talloc_free() them and return NULL. A first step to report these errors to the ctrl command issuer is to not return NULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add ctrl_cmd_parse2() to return such instead of NULL. To stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors. ctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper around ctrl_cmd_parse2() which discards the cmd on error. No need really to deprecate ctrl_cmd_parse() yet; especially as long as compiler warnings might break jenkins builds. Change-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880
* ctrl: fix mem leak when handling GET_REPLY and SET_REPLYNeels Hofmeyr2017-12-181-2/+1
| | | | | | | | | | | | In ctrl_handle_msg() (code recently propagated from handle_control_read()), talloc_free() the parsed ctrl_cmd in all code paths. In particular, a free was missing in case ctrl_cmd_handle() returns CTRL_CMD_HANDLED. CTRL_CMD_HANDLED is triggered by GET_REPLY / SET_REPLY parsing, as show by ctrl_test.c. With the memleak fixed, adjust expected test output and make a detected mem leak abort the test immediately. Change-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381
* ctrl: prep test: separate new ctrl_handle_msg() from handle_control_read()Neels Hofmeyr2017-12-181-17/+26
| | | | | | | | | | In order to allow unit testing the ctrl iface msgb handling, have a separate msgb entry point function from the actual fd read function. An upcoming patch will prove a memory leak in CTRL msgb handling by a unit test that needs this separation. Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3
* utils: add osmo_escape_str()Neels Hofmeyr2017-12-181-0/+87
| | | | | | | | | | | | | To report invalid characters in identifiers, it is desirable to escape any weird characters. Otherwise we might print stray newlines or control characters in the log output. ctrl_test.c already uses a print_escaped() function, which will be replaced by osmo_escape_str() in a subsequent patch. control_cmd.c will use osmo_escape_str() to log invalid identifiers. Change-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a
* add osmo_auth_c3() (separate from gsm_milenage())Neels Hofmeyr2017-12-183-3/+16
| | | | | | | | | | | | | | | To send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA tokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES. For SRES, it requires an OPC, which may need to be derived from OP first. All we need is a Kc, so we could feed a zero OPC ... but to simplify the function call for cases where just a Kc is required, separate the c3 function out from gsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from gsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover exactly that implementation). Prepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc) Related: OS#2745 Change-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa
* rate_ctr: print proper error message if rate_ctr already existsHarald Welte2017-12-181-1/+4
| | | | Change-Id: I86b7ccb0931f5a2a489bb8c7c6aee0894a126eb8
* utils: add osmo_separated_identifiers_valid()Neels Hofmeyr2017-12-171-4/+17
| | | | | | | | For validating CTRL input, we want to verify that an input variable is a series of valid osmo_identifier_valid() separated by dots. Allow validating any additional chars with identifiers, for CTRL vars will be just ".". Change-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de
* fix osmo_identifier_valid(): only allow printable charactersNeels Hofmeyr2017-12-171-0/+2
| | | | | | In particular disallow ASCII 0..31 (control characters) and 127 (DEL). Change-Id: I04469988495af03c881fe81d7786ca7f71636299
* Do not allocate already existing counter groupMax2017-12-171-0/+3
| | | | | | | | Check that no group with the given name and index already exist before allocating it. Add corresponding test case. Change-Id: I563764af1d28043e909234ebb048239125ce6ecd Related: OS#2757
* gsm0808_create_cipher_reject: Fix encoding of Cause IEHarald Welte2017-12-171-1/+2
| | | | | | | | | The Cause IE in the 08.08 CIPHER MODE REJECT is a normal TLV IE, and not just a value. Let's make sure we encode the cause value properly. Change-Id: I4f5b231edf6dcb0a9c2bbafb2a59f301f3b2402b Closes: OS#2766
* logging vty: describe 'logging set-log-mask' command, add OSMO_STRINGIFY_VAL()Neels Hofmeyr2017-12-121-2/+11
| | | | Change-Id: I73ac5873ede858da44e1486d8a5c81da1ed5b19f
* Add functions for extended RACH codingMax2017-12-113-17/+66
| | | | | | | | | | | Add support for extended RACH (11 bit) according 3GPP TS 45.003 ยง5.3.2: * convolutional code with puncturing * encoding/decoding routines * corresponding tests Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d Related: OS#1548
* Fix malformed Abis/RSL messages with extra L3 Information fieldPau Espin Pedrol2017-12-102-8/+1
| | | | | | | | | | | | | | | | | Some Abis/RSL messages such as "Release Indication" contained 3 extra bytes from an L3 Information header which should not be there according to specs in GSM 08.58 (section 8.3 "Radio link layer management messages"). Other RSL messages were affected by the same issue, except for "Establish Indication", which had already a workaround in send_rslms_dlsap. This commit fixes the issue in a generic way, removes the "Establish Indication" and fixes the test accounting for the bug, as it otherwise fails after applying the changes. Fixes: OS#1635, OS#2336 Change-Id: Ibb116214e8b1798d65a8b0917150496a3c14f344
* Fix LAPD UA msgb memory leak.Jean-Francois Dionne2017-12-101-0/+3
| | | | Change-Id: Ia4f0606810e00aa6f1779d11893e4acc01976f9a
* cosmetic: Fix trailing whitespacePau Espin Pedrol2017-12-102-8/+8
| | | | Change-Id: I0c7a414789f8ce6516369327430f71164e2cbd94
* vty: set name for VIEW+ENABLE nodes, for VTY referenceNeels Hofmeyr2017-12-101-0/+4
| | | | | | This leaves no unnamed chapters in future VTY reference documents. Change-Id: Iefb8b78094208a1a4c5d70bd6c69a3deca8da54f
* VTY reference: use node names as section namesNeels Hofmeyr2017-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 'show online-help' output, add the node names (currently all derived from the prompt) as <node><name> entry, so that in the osmo-gsm-manuals, each section of node commands gets a title. So far, each section of commands has no name at all, and it is entirely up for guessing which part of the VTY the commands are about. Node section names, e.g. for OsmoHLR, will be like 1 VTY reference 1.4 config 1.5 config-log 1.6 config-line 1.7 config-ctrl 1.8 config-hlr 1.9 config-hlr-gsup Before this patch, all but '1 VTY reference' were plain empty. A better solution would be to list the actual command name that enters the node, and to nest the commands identically to VTY node nesting, but since this information is currently hidden in node command implementations, it is impossible to derive it. So we should actually make the VTY reflect the node nesting structure in its data model, which would resolve both the accurate node name problem as well as produce well-structured output to generate the VTY references from. This patch is a workaround for lack of a more profound fix of the VTY data model. At least it makes the VTY references' sections even remotely useful. Change-Id: Iaf745b2ab3d9b02fc47025a0eba3beb711068bfe
* VTY reference: do not list empty nodesNeels Hofmeyr2017-12-101-0/+2
| | | | | | | In 'show online-help' output, don't list nodes that have no commands (the 'Password' node). Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c
* vty XML export: avoid repeating common node commands for each nodeNeels Hofmeyr2017-12-101-0/+45
| | | | | | | | | | | We use 'show online-help' to generate VTY reference manuals. It is not helpful to include the common node commands on each and every node level, it clutters the actual useful help. Have a separate first section called 'Common Commands', but omit them elsewhere. Change-Id: Ie802eccad80887968b10269ff9c0e9797268e0d4
* vty: show asciidoc counters: don't create an empty table for osmo_countersAlexander Couzens2017-12-051-0/+7
| | | | | | When creating asciidocs for osmo_counter an empty is not useful. If there aren't any counter, output a hidden comment Change-Id: Ie2768100e69dcd7d8d77533688585dd9b43c4a5e
* counters: add osmo_counters_count() returns the amount of countersAlexander Couzens2017-12-051-0/+7
| | | | Change-Id: I9068231d71876e06d27ee67a688d7fb611ac3a1b
* Fix embedded buildMax2017-12-042-0/+10
| | | | | | | Do not attempt to load auth plugins - this does not make sense on embedded target anyway. Change-Id: Ie92d2eea21e19e499b3f3bb4d5a82e31fbbea3f0
* ctrl: make response easier to parseMax2017-11-271-32/+9
| | | | | | | | | | | | | | | | | | | | Previously ctrl request for all counters in group (e. g. 'rate_ctr.abs.msc.0') will result in human-readable description which is not regular enough and is hard to both parse and generate. The ctrl interface is intended for m2m, not for human interaction. Let's simplify things by making response similar to counter group request ('rate_ctr.*'). Reply now looks as follows: GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 loc_update_type:attach 0;loc_update_type:normal 0; Previously it was: GET_REPLY 9084354783926137287 rate_ctr.abs.msc.0 All counters in msc.0 loc_update_type:attach 0 loc_update_type:normal 0 Change-Id: I7a24cc307450efdcd28168fffe477320c59fcd36 Related: OS#2550
* fsm_tmr_cb: don't set T=0, the fi may no longer existNeels Hofmeyr2017-11-251-4/+5
| | | | | | | | | | | | | | | | | | | | | When calling the timer_cb, that may have effected an fi termination and deallocation, e.g. from dispatching events and/or complex choices made. Current timer_cb implementations expect T to reflect the fired timer number, so we can't actually set T=0 before calling the timer_cb. Instead, never reset T to zero, let it always reflect the timer that last fired. When a new timer starts, T will be set to its new value. Adding a T arg to the timer_cb() would have been the cleanest solution, so that fi->T can be set to zero before dispatching the timer_cb. But since we've already rolled out this FSM API, we should stay backwards compatible. In the case where the timer returned 1 to request termination, we can assume that the fi still exists, but to be consistent, don't set T = 0 in that code path either. Change-Id: I18626b55a1491098b3ed602df1b331f08d25625a
* Improve get_rate_ctr() error handlingMax2017-11-241-1/+1
| | | | | | | Report back expected interval values. Change-Id: I05ca7f716342af4f7424b28216ed6c1bf2bd589f Related: OS#2550
* ctrl: log incorrect interval valuesMax2017-11-241-4/+7
| | | | | | | | This should never happen with the current code, but if it ever does, we should log the error instead of silently returning 0. Change-Id: I544001d3072e5f12a96a67e4178f9b945c5f6b6c Related: OS#2550
* Ctrl: add rate counter group introspectionMax2017-11-241-0/+18
| | | | | | | | | | | | Before user have to know group name and index in advance to request rate counter value. Introduce introspection function which allows user to obtain all the groups and their indexes by requesting 'rate_ctr.*' variable. This simplifies KPI dumping over ctrl interface. Change-Id: Ifad8b4f0360c8bcd123a838676516476e84c246a Related: OS#2550
* osmo_strlcpy: sanitize: don't memcpy from NULL src even if len is 0Neels Hofmeyr2017-11-211-1/+2
| | | | | | | | Some callers pass NULL and len == 0. The semantics are that we then nul-terminate an emtpy string. Avoid a sanitizer warning by not calling memcpy() for the NULL case. Change-Id: I883048cf2807e606c6481634dbd569fc12aed889
* gprs_bssgp: bssgp_fc_in(): fix mem leak on queue overflowNeels Hofmeyr2017-11-201-1/+5
| | | | | | | | | | | | | | | | |