This makes the type in line with string(3) functions and eliminates some
compiler warnings.
Also update the related bencode data type.
Change-Id: I7ef4024f4b5a0f737b3dbe03bcd078032395bce6
If the seq_file buffer overflows, the printing of the last item is
re-tried following a stop/start event on the seq_file. Therefore we
cannot unconditionally increase the offset whenever our `next` method is
called.
closes#1244
Change-Id: I7026deeeb03423cc2da57b1e069019638cf734cf
The SSRC mapping strategy can change if a re-invite disengages
transcoding, therefore we always need to update the output SSRC mapping
even if the SSRC entry has already existed, to avoid stray SSRC changes.
Change-Id: Ib6f14ede1a4e615ff5eb8372cc68bf1acdd4b6c8
(cherry picked from commit dd7acd2644)
This construct was used due to ancient bogus shell implementations, but
it is of no relevance anymore. Use the "modern" -z test instead.
Change-Id: Iad882c99148e548e926b083df8ca428c591e2c4f
Fixes: shellcheck SC2268
If the CFLAGS already contain -O0, skip adding the hardening flags, as
they force inclusion of -O2
Change-Id: I12ab0a61fff169954c73f3a714e563234c841483
Make sure the pointers we return from our continuous memory buffer is
always 64-bit aligned as it's used not only for strings, but also for
structs/objects, and such unaligned memory access is undefined on some
archs and flagged as such by ASAN.
Change-Id: I84cf74e4e9d203fe02507aa1190ccc6554fb36e2
UBSAN doesn't print stack traces by default. Enable them.
The GLib slice allocator must be disabled for proper leak checks and
must be instructed to always use malloc instead.
Change-Id: Ic4fe5ad38aa4460fbe43858b97226cce7d658038
Avoid accessing memory via pointers that may not be aligned, which is
undefined behaviour on some archs. Use memcpy for this purpose instead.
Change-Id: Iec6c8d15fdd7ef00896e494b69412847b637b01b
Check if the uint64_t pointer is aligned before using it. If unaligned,
go byte by byte. Unaligned pointer access is undefined on some archs and
flagged as such by ASAN.
Change-Id: I3afc80a2ddbc874a62d6930971493f8d461aa452
If the length of the string is zero, the pointer to the buffer may be
null. ASAN flags these as invalid/undefined, so don't do that.
Change-Id: Ic55498465c53a78e1bd44c42d1a60f9bd3336473