<div dir="ltr"><div>Hello, </div><div><br></div><div>I'm in a scenario with very bad network conditions on IP cameras.</div><div><br></div><div>I
 found a random crash on Windows on the decodUrl function calling on 
assert function because isxdigit function implementation on Windows 
requires values between -1 and 255..</div><div><br></div><div>It seems sometimes i lost packet and data come not correctly.</div><div><br></div><div>I reproduce the assertion on Linux by modif with the call to isxdigit by  p_isxdigit.</div><div><br></div><div>static int p_isxdigit( int ch )<br>{<br>  assert(ch >= -1 && ch <= 255);<br>  return isxdigit(ch);<br>}</div><div><div><br></div><div>Here a sample of printed data i received.</div><div><br></div><div>R�"P~
 @ c�� ���� q�3RS�ZS�� � �� [H��u�{{� [\#s��'?�4V���������  ��  
���\2ER7�X^:e� ��]�p ��Z�C��p[�M�������I� ��D0D��Po�"��n�R� � � 
����gr-;�( P�/S ,f�R�
         ��2� ����nt��a�����C< x��2F�"  �Q�W����� yr q��a<br>4 \s#�� !u��� �
 �( KA | p�]RH�!�G]0.����� ��68%�Ct ��_�+�L���F����5m��bZP� 
lV���N����2qN~�rZ?�Y�   ��R�vZ�:�� M�ku���A���5~��|���� �2�� ����/ 
u"���`5����)�?�\  Sl�*� �(�! �� ����e=�T������f����O��6 �)'�9
 e�R �� ��4�q�#;��~���� �_ ��C��lYD����AP �s�V��RTSP/1.0 200 OK<br>CSeq: 12<br>Public: OPTIONS, DESCRIBE, PLAY, PAUSE, SETUP, TEARDOWN, SET_PARAMETER, GET_PARAMETER<br>Date:  Mon, Sep 15 2025 16:53:45 GMT</div></div><div><br></div><div>I understand we come here because be found an RTSP/ string and before it a / in the parseRTSPRequestString.</div><div><br></div><div>I
 think we can fix the assertion by forcing the call 
to isxdigit(cursor[1]) by isxdigit((char)cursor[1]), but I don't know if
 something should be done before that, to prevent further problems.</div><div></div><div><br></div><div>Here my program backtrace.</div><div><br></div><div>(gdb) bt<br>#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44<br>#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78<br>#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89<br>#3  0x00007ffff164527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26<br>#4  0x00007ffff16288ff in __GI_abort () at ./stdlib/abort.c:79<br>#5
  0x00007ffff162881b in __assert_fail_base (fmt=0x7fffd95ad446 
"%s%s%s :%u : %s%s l'assertion « %s » a échoué.\n%n", 
assertion=assertion@entry=0x7ffff7da728f "ch >= -1 && ch
 <= 255", file=file@entry=0x7ffff7da7280 "RTSPCommon.cpp", 
line=line@entry=31, function=function@entry=0x7ffff7da726c "int p_isxdigit(int)") at ./assert/assert.c:96<br>#6
  0x00007ffff163b517 in __assert_fail (assertion=0x7ffff7da728f "ch 
>= -1 && ch <= 255", file=0x7ffff7da7280 "RTSPCommon.cpp",
 line=31, function=0x7ffff7da726c "int p_isxdigit(int)") at 
./assert/assert.c:105<br>#7  0x00007ffff7d5c69c in p_isxdigit (ch=-58) at RTSPCommon.cpp:31<br>#8  0x00007ffff7d5c703 in decodeURL (url=0x7ffeed7e9391 "%\306Ct\002\355\315_\247+\257Lݖ\227F\3005m\232\312bZP\312\017lV\263\362\351N\271\214\206\2452qN~\361rZ?\304Y\231\035\004\024\342\367R\266vZ4\b\346:\233\317\001M\353kuޖ\200A\371>\260\2635~\243\374|\216\372\242\206\033\3522\275\317\025\316嬖") at RTSPCommon.cpp:40<br>#9  0x00007ffff7d5cca4 in parseRTSPRequestString (reqStr=0x7ffee0010a70 "R\322\"P~\016@\vc\342\310\030ƿ\335\307\177q\2473RS\327ZS\236\325\006\344\020\326\300\002[H\241\313u\230{{\274\v[\\#s\256\204'?\3114V᷍\217\271\221\222\231\317\037\024\256\210\027\020·\315\\2ER7\224X^:e\226\003\372\375]\242p\032\303\302Z", reqStrSize=615, resultCmdName=0x7ffeed7e9260 "R\322\"P~\016@\vc\342\310\030ƿ\335\307\177q\2473RS\327ZS\236\325\006\344\020\326\300\002[H\241\313u\230{{\274\v[\\#s\256\204'?\3114V᷍\217\271\221\222\231\317\037\024\256\210\027\020·\315\\2ER7\224X^:e\226\003\372\375]\242p\032\303\302Z", resultCmdNameMaxSize=200, resultURLPreSuffix=0x7ffeed7e9330 " \226\2162\231\017\341\262ܳnt\342\372a\203\362\220\326\332C<\003x\270>\2642F\374\"\177\023\272Q\212W\302\324ʝ\352\ayr\027q\232\260a\n4\023\\s#\370\227\006!u\340\325\337\v\314\002\305(\026KA\034|\033p\276]RH\335!\346G]0.\245\363\302ƿ\026\346\21368%\306Ct\002\355\315_\247+\257Lݖ\227F\3005m\232\312bZP\312\017lV\263\362\351N\271\214\206\2452qN~\361rZ?\304Y\231\035\004\024\342\367R\266vZ4\b\346:\233\317\001M\353kuޖ\200A\371>\260\2635~\243\374|\216\372\242\206\033\3522\275\317\025\316嬖", resultURLPreSuffixMaxSize=200, resultURLSuffix=0x7ffeed7e9400 "\au\"\276ț`5\232\225\202\234)\334?\203\\\021\030Sl\235*\351\032\314(\237!\005\351\250\030\262\247\236\213e=\356T\375\245\260\301\300\330f\230\205\267\253O\214\3176\027\351)'\3049 e\224R\022\210\260\003\261\2074\270q\334#;\351\323~\353\270\361\221\034\301_\005\242\230C\300\273lYD\361ک\232AP\030\371s\361V\276\245", resultURLSuffixMaxSize=200, resultCSeq=0x7ffeed7e94d0 " ", resultCSeqMaxSize=200, resultSessionIdStr=0x7ffeed7e95a0
 "\200}\020\340\376\177", resultSessionIdStrMaxSize=200, 
contentLength=@0x7ffeed7e925c: 32766, urlIsRTSPS=@0x7ffeed7e925b: 0 
'\000') at RTSPCommon.cpp:156<br>#10 0x00007ffff7d57b52 in RTSPClient::handleIncomingRequest (this=0x7ffee001bff0) at RTSPClient.cpp:1099<br>#11 0x00007ffff7d5a59e in RTSPClient::handleResponseBytes (this=0x7ffee001bff0, newBytesRead=1) at RTSPClient.cpp:1796<br>#12 0x00007ffff7d5946d in RTSPClient::handleAlternativeRequestByte1 (this=0x7ffee001bff0, requestByte=10 '\n') at RTSPClient.cpp:1494<br>#13 0x00007ffff7d593bf in RTSPClient::handleAlternativeRequestByte (rtspClient=0x7ffee001bff0, requestByte=10 '\n') at RTSPClient.cpp:1480<br>#14 0x00007ffff7d44038 in SocketDescriptor::tcpReadHandler1 (this=0x7ffee000b1b0, mask=2) at RTPInterface.cpp:563<br>#15 0x00007ffff7d43e37 in SocketDescriptor::tcpReadHandler (socketDescriptor=0x7ffee000b1b0, mask=2) at RTPInterface.cpp:517<br>#16 0x00007ffff7c37e15 in BasicTaskScheduler::SingleStep (this=0x7ffee001afc0, maxDelayTime=0) at BasicTaskScheduler.cpp:171<br>#17 0x00007ffff7c36790 in BasicTaskScheduler0::doEventLoop (this=0x7ffee001afc0, watchVariable=0x7ffee001af40 "") at BasicTaskScheduler0.cpp:87<br>#18 0x0000555555e7f526 in LiveMediaAccessModuleContext::start (this=0x7ffee001ae30, szMRL=0x7ffee4002560 "rtsp://<a href="http://192.168.100.27/Streaming/channels/101" target="_blank">192.168.100.27/Streaming/channels/101</a>", </div><div><br></div>Regard</div>