db_redis module implicitly supports conversion
of <null> key values into empty "" strings.
Remove empty-string/zero-length guards introduced
previously, because they break this behavior.
E.g.: dialog and usrloc modules can in fact
handle <null> key values.
Additionally: introduce the memcpy() guard.
Change-Id: I96515b8a4dfea6eef16a05b5d9f970946a9fc915
(cherry picked from commit 743265a8c4)
(cherry picked from commit 06da671c6b)
Introduce a list of improvements for size overflow
protection:
- change func signatures to work with `size_t` only
- check the raw pointer and its length
- introduce optional max allowed keys size
This measure will protect inserts from extremely
large key size (e.g. negative length that then
gets into integer overflow) and from triggering
the stack canary.
Change-Id: I7e07e28b0ae398675f9980f42fe2b0f8ed61d51f
(cherry picked from commit c1876f6bae)
(cherry picked from commit 6fed6ff029)
This reverts commit 2000c2e5b5.
Reason for revert: The problem seems to be with the AVP on the configuration. Also, this check is already done before arriving at this place.
Change-Id: I0be5dd920c0cff606d4d5758908214c9fd5c7446
This patch check if the name passed to $avp was correctly initialized.
If not initialized it will print an error message and return 0 (no match).
Change-Id: Icc84f0ff1103eb759b2282bd76951a8410225910
The function mark_presentity_for_delete() is responsible for flagging
a record in the presentity table for later removal.
Previously, this was done by overwriting the etag field with a fixed, hardcoded string:
static str str_offline_etag_val = str_init("*#-OFFLINE-#*");
However, the etag is intended to uniquely identify each PUBLISH message.
Overwriting it with a constant value violates the following MySQL uniqueness constraint:
UNIQUE KEY presentity_idx (username, domain, event, etag)
For example, when handling multiple PUBLISH messages (e.g., for legA and legB of the same call),
the fields:
- username
- domain
- event
are identical, and uniqueness is ensured solely by the etag.
Replacing it with a fixed string may cause key collisions and trigger MySQL errors.
To address this without altering the database schema or indexes,
str_offline_etag_val is now appended to etag to retain its uniqueness.
Change-Id: Icfff5da5dbaae1c47b4a0f33904a64f3b98ea957
This field tells dpkg-buildpackage that no debian/rules target needs
to run as root-like (usually via fakeroot), and can be built with no
privileges (real or faked ones). This should make the build either
faster as there will be no interposed libc calls via an LD_PRELOAD
library like fakeroot does, and more robust as fakeroot needs to keep
up with implementation details from the system libc; or more secure if
the build was being done via real root.
The full documentation can be found with «man deb-src-control» and
at «/usr/share/doc/dpkg/spec/rootless-builds.txt».
We no longer need to build the package as (fake)root. A rebuild before
and after this change produces the same file list (except for a renamed
debug symbol file due to file contents change) and permissions.
Change-Id: If60eb03b8a7c3813fcd2dd2bab70a36b9ac7a888
Always use to-tag for NG message with rtpp-flags,
if presented. This change is caused by the processing
logic being moved to rtpengine with rtpp-flags.
Change-Id: Ib656fdccbd366053bab37ef04c48659a6fd3acc1