majestic icon indicating copy to clipboard operation
majestic copied to clipboard

Segmentation fault after bad ONVIF request

Open sansarus opened this issue 1 year ago • 2 comments

Required information

  • Camera board id: XM 00001532

  • OpenIPC version: 2.4.10.07-lite

  • Commit:

  • Branch:

  • Tag:

  • installation method: coupler

  • modified majestic.yaml: no

    Core dump file from /tmp/ majestic.2184.11.1728464569.core

Issue description

Tried to ask StreamUri via ONVIF Device Test Tool v20.12 rev.6434
and Majestic died with Segmentation fault (core dumped)

template onvif request !!!without selected Profile Token!!!

Request:

POST /onvif/media_service HTTP/1.1
Host: 192.168.220.74
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 344

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <GetStreamUri xmlns="http://www.onvif.org/ver20/media/wsdl">
      <Protocol>RTSP</Protocol>
      <ProfileToken />
    </GetStreamUri>
  </s:Body>
</s:Envelope>`

Correct request with Profile Token work good

Request:

POST /onvif/media_service HTTP/1.1
Host: 192.168.220.74
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 373

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <GetStreamUri xmlns="http://www.onvif.org/ver20/media/wsdl">
      <Protocol>RTSP</Protocol>
      <ProfileToken>MainStreamToken</ProfileToken> ////!!!!!!!!
    </GetStreamUri>
  </s:Body>
</s:Envelope>

sansarus avatar Oct 09 '24 09:10 sansarus

Thank you very much for the report We will definitely check this and try to fix it.

flyrouter avatar Oct 09 '24 09:10 flyrouter

Good day Please check the new build and give feedback. Thank you.

flyrouter avatar Oct 26 '24 15:10 flyrouter

Work fine Version 2.4.11.17-lite Build master+7294e1e, 2024-11-17 Majestic master+5b0ddcd, 2024-11-13

sansarus avatar Nov 18 '24 13:11 sansarus