Respect unique_service_name error in ssdp_request_type.
Respect unique_service_name error in ssdp_request_type so as not to touch non-terminated buffer under Evt. (cherry picked from commit 5944960e172a797a9fcc196291f4046cafa7f6ec)
This commit is contained in:
parent
9223094468
commit
c9024bbb40
@ -328,6 +328,8 @@ Version 1.6.16
|
|||||||
* Pass output buffer size to addrToString and detect overflow.
|
* Pass output buffer size to addrToString and detect overflow.
|
||||||
* Handle addrToString error in configure_urlbase.
|
* Handle addrToString error in configure_urlbase.
|
||||||
* Handle overflow in http_SendMessage.
|
* Handle overflow in http_SendMessage.
|
||||||
|
* Respect unique_service_name error in ssdp_request_type
|
||||||
|
so as not to touch non-terminated buffer under Evt.
|
||||||
* Treat large argument as error in UpnpAddVirtualDir.
|
* Treat large argument as error in UpnpAddVirtualDir.
|
||||||
* Do not clear buffer before snprintf.
|
* Do not clear buffer before snprintf.
|
||||||
* Clarify the last argument of GetDescDocumentAndURL has size LINE_SIZE.
|
* Clarify the last argument of GetDescDocumentAndURL has size LINE_SIZE.
|
||||||
|
@ -552,7 +552,10 @@ int ssdp_request_type(char *cmd, SsdpEvent *Evt)
|
|||||||
{
|
{
|
||||||
/* clear event */
|
/* clear event */
|
||||||
memset(Evt, 0, sizeof(SsdpEvent));
|
memset(Evt, 0, sizeof(SsdpEvent));
|
||||||
unique_service_name(cmd, Evt);
|
if (unique_service_name(cmd, Evt) != 0) {
|
||||||
|
Evt->ErrCode = E_HTTP_SYNTEX;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
Evt->ErrCode = NO_ERROR_FOUND;
|
Evt->ErrCode = NO_ERROR_FOUND;
|
||||||
if ((Evt->RequestType = ssdp_request_type1(cmd)) == SSDP_SERROR) {
|
if ((Evt->RequestType = ssdp_request_type1(cmd)) == SSDP_SERROR) {
|
||||||
Evt->ErrCode = E_HTTP_SYNTEX;
|
Evt->ErrCode = E_HTTP_SYNTEX;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user