Export to GitHub

rfc5766-turn-server - issue #91

MAX_CLIENTS overflow when running turnutils_uclient with -n 2000


Posted on Dec 30, 2013 by Massive Lion

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

  1. 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?

Comment #1

Posted on Dec 30, 2013 by Massive Lion

forgot patch

Attachments

Comment #2

Posted on Dec 30, 2013 by Happy Giraffe

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

Comment #3

Posted on Dec 30, 2013 by Happy Giraffe

(No comment was entered for this change.)

Comment #4

Posted on Dec 30, 2013 by Happy Giraffe

Fixed in 3.2.1.0-beta-4

Comment #5

Posted on Dec 30, 2013 by Happy Giraffe

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.

Comment #6

Posted on Dec 31, 2013 by Happy Giraffe

I added ucudbm@gmail.com as patch author to uclient.c code comments.

Status: Fixed

Labels:
Type-Defect Priority-Medium