[pulseaudio-discuss] [PATCH] module-rtp-recv: fix crash on empty UDP packets
Alexander E. Patrakov
patrakov at gmail.com
Sat May 31 10:48:36 PDT 2014
Signed-off-by: Alexander E. Patrakov <patrakov at gmail.com>
---
src/modules/rtp/rtp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
index 570737e..8451386 100644
--- a/src/modules/rtp/rtp.c
+++ b/src/modules/rtp/rtp.c
@@ -183,7 +183,7 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
}
if (size <= 0)
- return 0;
+ size = 1; /* invalid or empty packet, let the recvfrom() or size check fail */
if (c->memchunk.length < (unsigned) size) {
size_t l;
--
1.9.3
More information about the pulseaudio-discuss
mailing list