Commit 149db244 authored by Leo's avatar Leo Committed by Natanael Copa

main/libnice: update to 0.1.15

parent 0e776a42
From 603ab1d45d0103fc51031152a10ddbdaf7dadf86 Mon Sep 17 00:00:00 2001
From: Jakub Adam <jakub.adam@collabora.com>
Date: Thu, 3 Jan 2019 09:50:25 +0100
Subject: [PATCH] udp-turn: Fix unaligned memory access on ARM
---
socket/udp-turn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/socket/udp-turn.c b/socket/udp-turn.c
index bf81fd9c..1bc5e031 100644
--- a/socket/udp-turn.c
+++ b/socket/udp-turn.c
@@ -362,7 +362,7 @@ socket_recv_messages (NiceSocket *sock,
guint f_buffer_len = priv->fragment_buffer->len;
for (i = 0; i < n_recv_messages && f_buffer_len >= sizeof (guint16); ++i) {
- guint16 msg_len = ntohs (*(guint16 *)f_buffer) + sizeof (guint16);
+ guint16 msg_len = ((f_buffer[0] << 8) | f_buffer[1]) + sizeof (guint16);
if (msg_len > f_buffer_len) {
/* The next message in the buffer isn't complete yet. Wait for more
@@ -452,7 +452,7 @@ socket_recv_messages (NiceSocket *sock,
* return. */
guint16 msg_len = 0;
if (!priv->fragment_buffer) {
- msg_len = ntohs (*(guint16 *)buffer) + sizeof (guint16);
+ msg_len = ((buffer[0] << 8) | buffer[1]) + sizeof (guint16);
if (msg_len > parsed_buffer_length) {
/* The RFC4571 frame is larger than the current TURN message, need to
* buffer it and wait for more data. */
From 6b1eec0630516698ac9cd3343ef7eb8515fee231 Mon Sep 17 00:00:00 2001
From: Jakub Adam <jakub.adam@collabora.com>
Date: Thu, 3 Jan 2019 21:26:41 +0100
Subject: [PATCH] udp-turn: Avoid potential integer overflow
---
socket/udp-turn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/socket/udp-turn.c b/socket/udp-turn.c
index 1bc5e031..c3b152d1 100644
--- a/socket/udp-turn.c
+++ b/socket/udp-turn.c
@@ -362,7 +362,7 @@ socket_recv_messages (NiceSocket *sock,
guint f_buffer_len = priv->fragment_buffer->len;
for (i = 0; i < n_recv_messages && f_buffer_len >= sizeof (guint16); ++i) {
- guint16 msg_len = ((f_buffer[0] << 8) | f_buffer[1]) + sizeof (guint16);
+ guint32 msg_len = ((f_buffer[0] << 8) | f_buffer[1]) + sizeof (guint16);
if (msg_len > f_buffer_len) {
/* The next message in the buffer isn't complete yet. Wait for more
@@ -450,7 +450,7 @@ socket_recv_messages (NiceSocket *sock,
if (nice_socket_is_reliable (sock) && parsed_buffer_length > 0) {
/* Determine the portion of the current NiceInputMessage we can already
* return. */
- guint16 msg_len = 0;
+ gint32 msg_len = 0;
if (!priv->fragment_buffer) {
msg_len = ((buffer[0] << 8) | buffer[1]) + sizeof (guint16);
if (msg_len > parsed_buffer_length) {
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnice
pkgver=0.1.14
pkgrel=2
pkgver=0.1.15
pkgrel=0
pkgdesc="GLib ICE implementation"
options="!check" # Testsuite fails
url="https://nice.freedesktop.org/wiki/"
arch="all"
license="LGPL-2.0 and MPL-1.1"
makedepends="glib-dev gnutls-dev gstreamer-dev gst-plugins-base-dev
gstreamer0.10-dev gst-plugins-base0.10-dev
gobject-introspection-dev"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc
$pkgname-gstreamer0.10:_gst010 $pkgname-gstreamer:_gst"
source="https://nice.freedesktop.org/releases/libnice-$pkgver.tar.gz"
license="LGPL-2.0-or-later MPL-1.1"
makedepends="
glib-dev
gnutls-dev
gstreamer-dev
gobject-introspection-dev
gtk-doc
meson"
subpackages="
$pkgname-dbg
$pkgname-dev
$pkgname-doc
$pkgname-gstreamer:_gst"
source="https://nice.freedesktop.org/releases/libnice-$pkgver.tar.gz
0001-fix-unaligned-memory-access-on-arm.patch
0002-avoid-potential-integer-overflow.patch"
builddir="$srcdir"/$pkgname-$pkgver
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-introspection
make
meson --prefix=/usr \
--libdir=/usr/lib \
--bindir=/usr/bin \
-Dgtk_doc=enabled \
-Dtests=disabled \
-Dexamples=disabled \
-Dintrospection=enabled \
-Dcrypto-library=gnutls \
-Dgstreamer=enabled \
-Dgupnp=disabled builddir
ninja -C builddir
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
_gst010() {
pkgdesc="Gstreamer-0.10 plugin for libnice"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/gstreamer-0.10 "$subpkgdir"/usr/lib/
DESTDIR="$pkgdir" ninja -C builddir install
}
_gst() {
......@@ -46,4 +50,6 @@ _gst() {
mv "$pkgdir"/usr/lib/gstreamer-1.0 "$subpkgdir"/usr/lib/
}
sha512sums="58bd0e0f630f4f14fe4765f2dab24215d71d61a4e7dc260cdb34eb0254b3dcdc9ce3b6fb010800250fb85f91e06b1c48cfcdd6e18867324609ead17a9106d4dd libnice-0.1.14.tar.gz"
sha512sums="60a8bcca06c0ab300dfabbf13e45aeac2085d553c420c5cc4d2fdeb46b449b2b9c9aee8015b0662c16bd1cecf5a49824b7e24951a8a0b66a87074cb00a619c0c libnice-0.1.15.tar.gz
aaa77945e871978a8a46ac4c2d6e006c3070ca2b362b9999a3aae840b3e7849fa3eacfc378e054e82ffe67c9a036b7259acf1a71cf8d823ab28dcce7961ff6bc 0001-fix-unaligned-memory-access-on-arm.patch
81e091921714e670872f82e097a3021f3d594764eeb4ce7d0f955e9b5249367e5d3acb73d54741240796ff4afd445cb0faa38ee453998a07657b68c2085b39e4 0002-avoid-potential-integer-overflow.patch"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment