[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 304/411: rtsp: fixed Session ID comparison to refuse prefix
From: |
gnunet |
Subject: |
[gnurl] 304/411: rtsp: fixed Session ID comparison to refuse prefix |
Date: |
Wed, 13 Jan 2021 01:21:59 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit adb0fcfab238ac6858ade3b9b5cc332fa0f60dfd
Author: Harry Sintonen <sintonen@iki.fi>
AuthorDate: Tue Nov 3 03:36:56 2020 +0200
rtsp: fixed Session ID comparison to refuse prefix
Closes #6161
---
lib/rtsp.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/lib/rtsp.c b/lib/rtsp.c
index 46c3c4f8f..93aac0f20 100644
--- a/lib/rtsp.c
+++ b/lib/rtsp.c
@@ -786,9 +786,18 @@ CURLcode Curl_rtsp_parseheader(struct connectdata *conn,
failf(data, "Got a blank Session ID");
}
else if(data->set.str[STRING_RTSP_SESSION_ID]) {
+ char *end;
+ size_t idlen;
+
+ /* Find the end of Session ID */
+ end = start + 1;
+ while(*end && !ISSPACE(*end))
+ end++;
+ idlen = end - start;
+
/* If the Session ID is set, then compare */
- if(strncmp(start, data->set.str[STRING_RTSP_SESSION_ID],
- strlen(data->set.str[STRING_RTSP_SESSION_ID])) != 0) {
+ if(strlen(data->set.str[STRING_RTSP_SESSION_ID]) != idlen ||
+ strncmp(start, data->set.str[STRING_RTSP_SESSION_ID], idlen) != 0) {
failf(data, "Got RTSP Session ID Line [%s], but wanted ID [%s]",
start, data->set.str[STRING_RTSP_SESSION_ID]);
return CURLE_RTSP_SESSION_ERROR;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 379/411: ngtcp2: advertise h3 ALPN unconditionally, (continued)
- [gnurl] 379/411: ngtcp2: advertise h3 ALPN unconditionally, gnunet, 2021/01/12
- [gnurl] 386/411: splay: rename Curl_splayremovebyaddr to Curl_splayremove, gnunet, 2021/01/12
- [gnurl] 392/411: tests/util.py: fix compatibility with Python 2, gnunet, 2021/01/12
- [gnurl] 399/411: urlapi: don't accept blank port number field without scheme, gnunet, 2021/01/12
- [gnurl] 410/411: adjust makefile for opts, gnunet, 2021/01/12
- [gnurl] 366/411: urldata: remove 'void *protop' and create the union 'p', gnunet, 2021/01/12
- [gnurl] 344/411: cirrus: build with FreeBSD 12.2 in CirrusCI, gnunet, 2021/01/12
- [gnurl] 313/411: copyright: fix year ranges, gnunet, 2021/01/12
- [gnurl] 373/411: tool_writeout: use off_t getinfo-types instead of doubles, gnunet, 2021/01/12
- [gnurl] 341/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 304/411: rtsp: fixed Session ID comparison to refuse prefix,
gnunet <=
- [gnurl] 350/411: KNOWN_BUGS: cmake build doesn't fail if zlib not found, gnunet, 2021/01/12
- [gnurl] 323/411: FAQ: remove "Why is there a HTTP/1.1 in my HTTP/2 request?", gnunet, 2021/01/12
- [gnurl] 365/411: winbuild: remove docs from Makefiles and refer to README.md, gnunet, 2021/01/12
- [gnurl] 343/411: tests/*server.py: close log file after each log line, gnunet, 2021/01/12
- [gnurl] 307/411: travis: use ninja-build for CMake builds, gnunet, 2021/01/12
- [gnurl] 287/411: tests: fix some http/2 tests for older versions of nghttpx, gnunet, 2021/01/12
- [gnurl] 408/411: gnurl adjustments (paths), gnunet, 2021/01/12
- [gnurl] 405/411: urldata: restore comment on ssl_connect_data.use, gnunet, 2021/01/12
- [gnurl] 396/411: scripts/completion.pl: parse all opts, gnunet, 2021/01/12
- [gnurl] 388/411: cmake: check for linux/tcp.h, gnunet, 2021/01/12