osmo-msc/openbsc/src/libmsc
Jacob Erlbeck 76606d3473 nitb/ctrl: Fix access to freed memory in verify_subscriber_modify
Currently the temporary string 'tmp' is freed before parts of it are
referenced. This lets address sanitizer complain when evaluating
strlen(imsi), where imsi points into the 'tmp' data block.

This patch moves the talloc_free to the end of the function and uses
a rc variable instead of using early returns.

Addresses:
testSubscriberAddRemove (__main__.TestCtrlNITB) ... Launch:
./src/osmo-nitb/osmo-nitb -c
  ./doc/examples/osmo-nitb/nanobts/openbsc.cfg -l test_hlr.sqlite3
Connecting to host 127.0.0.1:4249
Sending "SET 1000 subscriber-modify-v1 2620345,445566"
Decoded replies:  {}
ERROR

Sponsored-by: On-Waves ehf
2014-10-28 15:17:02 +01:00
..
Makefile.am nitb/ctrl: Add command to add/modify a subscriber to the database 2014-03-23 14:05:49 +01:00
auth.c src: use namespace prefix osmo_* for misc utils 2011-05-07 12:58:59 +02:00
ctrl_commands.c nitb/ctrl: Fix access to freed memory in verify_subscriber_modify 2014-10-28 15:17:02 +01:00
db.c DB: produce a backtrace in case of a DB error 2014-08-02 09:58:52 +02:00
gsm_04_08.c MNCC: Add IMSI to CALL CONFIRM message 2014-08-04 08:59:16 +02:00
gsm_04_11.c sms: Kill the sms->sender and use addr/ton/npi throughout the code 2014-04-30 15:31:57 +02:00
gsm_04_11_helper.c sms: Increment the RP Message Reference for each transaction 2014-02-20 11:35:56 +01:00
gsm_04_80.c ussd: Move to use gsm_7bit_encode_n_ussd for USSD encoding 2013-12-26 22:17:45 +01:00
gsm_subscriber.c db: Remove the struct gsm_network from the database layer 2013-10-13 13:44:54 +02:00
mncc.c mncc: Complete definitions for all speech traffic frames at MNCC interface 2014-03-20 22:36:16 +01:00
mncc_builtin.c mncc: Use helper function to check if an MNCC frame is data (speech/traffic) 2014-03-20 22:36:16 +01:00
mncc_sock.c mncc: Use helper function to check if an MNCC frame is data (speech/traffic) 2014-03-20 22:36:16 +01:00
osmo_msc.c sms/dtap: Add log messages to analyse SMS message loss 2014-01-31 11:17:44 +01:00
rrlp.c src: use namespace prefix osmo_signal* 2011-05-06 12:12:31 +02:00
silent_call.c sms/dtap: Add log messages to analyse SMS message loss 2014-01-31 11:17:44 +01:00
smpp_openbsc.c smpp: Fix small typo in the comment 2014-07-19 19:02:46 +02:00
smpp_smsc.c smpp_smsc: Fix integer overflow in read return value and msgb_alloc() 2014-03-06 23:20:30 +01:00
smpp_smsc.h smpp: Move the coding/mode detection into a utils file 2013-07-27 20:03:10 +02:00
smpp_utils.c smpp: Move the coding/mode detection into a utils file 2013-07-27 20:03:10 +02:00
smpp_vty.c vty: Use vty_install_default() instead of bsc_install_default() 2013-10-30 15:19:00 +01:00
sms_queue.c sms: Address the TODO and schedule the next SMS for an active subscriber 2014-02-24 16:13:04 +01:00
token_auth.c libmsc: Allow to set sender id when sending SMS from the VTY 2013-01-01 17:04:38 +01:00
transaction.c libmsc: Set the "trans->conn" to NULL to catch invalid usage 2013-12-27 18:07:23 +01:00
ussd.c ussd: Reject and release unhandled SS requests/interrogation 2013-12-28 17:52:23 +01:00
vty_interface_layer3.c nitb: Add subscriber delete command 2014-10-03 09:15:28 +02:00