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>
Unified · Split
| @@ -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)); // method | 1280 | av_strlcpy(reply->reason, buf1, sizeof(reply->reason)); // method |