altanai / rfc5766-turn-server

Automatically exported from code.google.com/p/rfc5766-turn-server
1 stars 0 forks source link

MAX_CLIENTS overflow when running turnutils_uclient with -n 2000 #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. compile
2. run server 
   ./turnserver
3. run 
 ./turnutils_uclient -P -T -h -l 1024 -n 100 -m2000 -e 127.0.0.1  -L 127.0.0.1 127.0.0.1

4. wait a segment fault will stop test client.

Root cause is `static app_ur_session* elems[MAX_CLIENTS]` hard coded as 1024.

I have a patch to fix this issue. 
1. remove MAX_CLIENTS declare.
2. add malloc and free to uclient.c:start_mclient()

Would you accept it please?

Original issue reported on code.google.com by ucu...@gmail.com on 30 Dec 2013 at 3:32

GoogleCodeExporter commented 9 years ago
forgot patch

Original comment by ucu...@gmail.com on 30 Dec 2013 at 3:34

Attachments:

GoogleCodeExporter commented 9 years ago
turnutils_uclient is just a test client, it was no supposed to run that many 
users. But I'll fix it. Thanks.

Original comment by mom040...@gmail.com on 30 Dec 2013 at 6:08

GoogleCodeExporter commented 9 years ago

Original comment by mom040...@gmail.com on 30 Dec 2013 at 6:08

GoogleCodeExporter commented 9 years ago
Fixed in 3.2.1.0-beta-4

Original comment by mom040...@gmail.com on 30 Dec 2013 at 6:24

GoogleCodeExporter commented 9 years ago
By the way, version 1.8.5.0 is an awfully outdated version, zillion of bugs 
have been fixed since then. Upgrade to a modern version.

Original comment by mom040...@gmail.com on 30 Dec 2013 at 6:34

GoogleCodeExporter commented 9 years ago
I added ucudbm@gmail.com as patch author to uclient.c code comments.

Original comment by mom040...@gmail.com on 31 Dec 2013 at 7:36