Commit 4c5c56a6 authored by Leo's avatar Leo Committed by Francesco Colista

main/libnice: upgrade to 0.1.16

parent 6646db38
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) {
......@@ -2,7 +2,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnice
pkgver=0.1.15
pkgver=0.1.16
pkgrel=0
pkgdesc="GLib ICE implementation"
options="!check" # Testsuite fails
......@@ -21,10 +21,7 @@ subpackages="
$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
source="https://nice.freedesktop.org/releases/libnice-$pkgver.tar.gz"
build() {
meson --prefix=/usr \
......@@ -50,6 +47,4 @@ _gst() {
mv "$pkgdir"/usr/lib/gstreamer-1.0 "$subpkgdir"/usr/lib/
}
sha512sums="60a8bcca06c0ab300dfabbf13e45aeac2085d553c420c5cc4d2fdeb46b449b2b9c9aee8015b0662c16bd1cecf5a49824b7e24951a8a0b66a87074cb00a619c0c libnice-0.1.15.tar.gz
aaa77945e871978a8a46ac4c2d6e006c3070ca2b362b9999a3aae840b3e7849fa3eacfc378e054e82ffe67c9a036b7259acf1a71cf8d823ab28dcce7961ff6bc 0001-fix-unaligned-memory-access-on-arm.patch
81e091921714e670872f82e097a3021f3d594764eeb4ce7d0f955e9b5249367e5d3acb73d54741240796ff4afd445cb0faa38ee453998a07657b68c2085b39e4 0002-avoid-potential-integer-overflow.patch"
sha512sums="8fdf0f9fcf43c0fdffbdcb61988a7f9e14bd13bb1bc561d2b9faf493deb18151da14d484740571a302fa203ec7109d45c361ea791e81a2b29932a26220ce902c libnice-0.1.16.tar.gz"
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