History

avformat/rtsp: fix leading space in RTSP reason

When parsing the RTSP message reason, the whole remainder after parsing the status code was used, which would lead to a leading space in the parsed reason string. (cherry picked from commit e63e040f0cef2d6af2fb57aefa6250fc450fa049) Signed-off-by: Marvin Scholz <epirat07@gmail.com>

Marvin Scholz committed 1 year ago

Commit d1f31a81 parent 1e56c511 file · +1 −0Browse files

Unified · Split

libavformat/rtsp.c+1−0
@@ -1274,6 +1274,7 @@ start: · 1273 unmodified lines
1274 if (!strncmp(buf1, "RTSP/", 5)) {1274 if (!strncmp(buf1, "RTSP/", 5)) {
1275 get_word(buf1, sizeof(buf1), &p);1275 get_word(buf1, sizeof(buf1), &p);
1276 reply->status_code = atoi(buf1);1276 reply->status_code = atoi(buf1);
1277 p += strspn(p, SPACE_CHARS);
1277 av_strlcpy(reply->reason, p, sizeof(reply->reason));1278 av_strlcpy(reply->reason, p, sizeof(reply->reason));
1278 } else {1279 } else {
1279 av_strlcpy(reply->reason, buf1, sizeof(reply->reason)); // method1280 av_strlcpy(reply->reason, buf1, sizeof(reply->reason)); // method

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t