Bug 92568 - [module-rtp-recv] non null terminated string / non portable sscanf
Summary: [module-rtp-recv] non null terminated string / non portable sscanf
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-21 13:49 UTC by Lev Melnikovsky
Modified: 2015-11-04 10:46 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch against pa5.0 (951 bytes, text/plain)
2015-10-21 13:49 UTC, Lev Melnikovsky
Details

Description Lev Melnikovsky 2015-10-21 13:49:21 UTC
Created attachment 119030 [details]
patch against pa5.0

In rtp.c:

if (sscanf(t+9, "%i %64c", &_payload, c) == 2)

the string c seems to be non-null terminated. It is later used as following:

c[strcspn(c, "\n")] = 0;

The same piece of code is responsible for the inability of pulseaudio on OpenWRT to handle RTP stream at the rate 48000 from another machine:

[pulseaudio] sdp.c: Failed to parse SDP data: missing data.

It turns out that uClibc does not agree with glibc about "%64c", see http://git.uclibc.org/uClibc/tree/docs/Glibc_vs_uClibc_Differences.txt

Attached is a patch that should take care of both issues.
Comment 1 Tanu Kaskinen 2015-11-04 10:46:12 UTC
Thanks a lot! I applied the patch now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.