libosmocore/src
Harald Welte aeecc48c45 Introduce osmo_strlcpy() function so we can stop using strncpy()
I'm aware of the existing criticism on stlrcpy(), but I think it is
still better than what we have now: stnrcpy(), sometimes with Coverity
warnings and sometimes with a manual setting of the termination byte.

The implementation follows the linux kernel strlcpy() which is claimed
to be BSD compatible.

We could of course link against libbsd on Linux instead, but I think
it's reasonably small and simple to provide our own implementation.
Future versions of libosmocore could use some autoconf magic and
preprocessor macros to use the system-provided strlcpy() if it exists.

Change-Id: Ifdc99b0e3b8631f1e771e58acaf9efb00a9cd493
2016-11-26 16:42:17 +00:00
..
codec Add null-pointer check to osmo_amr_rtp_dec() 2016-11-07 15:19:47 +01:00
ctrl Add function to send TRAP over Control Interface 2016-10-12 11:37:49 +00:00
gb bssgp_rx_paging(): Fix parsing of P-TMSI IE in Paging message 2016-11-11 14:49:31 +00:00
gsm osmo_gsup_encode(): Make coverity happy by invariant checking 2016-11-26 13:47:14 +00:00
sim misc: Some spelling errors corrected 2016-05-25 19:43:56 +00:00
vty telnet_interface: Handle osmo_fd_register() eror return code 2016-11-26 10:24:19 +01:00
Makefile.am add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
application.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
backtrace.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
bitcomp.c bitcomp: Remove the t4 decoding from libosmocore 2016-11-10 17:07:45 +00:00
bits.c Add octet-aligned/unaligned shift functions 2016-06-20 19:02:56 +02:00
bitvec.c bitvec: Force inlining of bitvec_set_bit_pos/bitvec_set_bit 2016-07-16 21:02:41 +00:00
conv.c misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
crc16.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
crcXXgen.c.tpl misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
fsm.c Add logging and testing for FSM deallocation 2016-11-08 19:35:19 +00:00
gsmtap_util.c Fix unchecked return valueof osmo_fd_register() 2016-11-26 00:10:07 +01:00
logging.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
logging_syslog.c doc: Fix the Doxygen section endings 2012-04-18 21:53:23 +02:00
loggingrb.c sttrb / loggingrb: Use GPLv2+ as license, not AGPLv3+ 2014-10-26 20:52:25 +01:00
macaddr.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
msgb.c msgb: add msgb_talloc_ctx_init(), deprecate msgb_set_talloc_ctx() 2016-09-27 11:46:38 +02:00
msgfile.c msgfile: Fix warning on BSDs stdio 2015-03-18 21:54:37 +01:00
panic.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
plugin.c add some missing doxygen annotation for libosmocore functions 2013-01-11 09:43:32 +01:00
prim.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
rate_ctr.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
rbtree.c fix FSF address in sources/headers 2015-11-12 13:46:05 +01:00
select.c osmo_select_main(): drop useless call to osmo_timers_check() 2016-09-28 10:48:46 +00:00
serial.c misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
signal.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
socket.c osmo_sock_init(): Fix memory leak in error path 2016-11-26 10:24:19 +01:00
stat_item.c stats: Add OSMO prefix to STAT_ITEM_NOVALUE_ID 2015-12-08 10:33:15 +01:00
statistics.c core: Add difference function to osmo_counter 2015-10-29 01:10:06 +01:00
stats.c statsd: Fix compiler warning (int32_t vs. int64_t) 2016-11-11 15:24:24 +01:00
stats_statsd.c statsd: Fix compiler warning (int32_t vs. int64_t) 2016-11-11 15:24:24 +01:00
strrb.c strrb.c: Use string.h, not strings.h 2014-11-14 15:21:18 +01:00
timer.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
timer_gettimeofday.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
utils.c Introduce osmo_strlcpy() function so we can stop using strncpy() 2016-11-26 16:42:17 +00:00
write_queue.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00