--config-file bug fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

In case anyone is using the pjsua --config-file option, if the last line in the
config file doesn't have a return (\n or an \r) then the parser may incorrectly
read past the end of the arguement string in the line buffer. If this arguement
is longer than 200 char then this also becomes a buffer overflow.

The following change protects against that.
In pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c?rev=2824, line=384

384 	        for (p = line; *p != '\0' && argc < MAX_ARGS && p <= &line[len-1];
p++) {

instead of 
382 	        if (len==0) continue;
383 	
384 	        for (p = line; *p != '\0' && argc < MAX_ARGS; p++) {
385 	            // first, scan whitespaces
386 	            while (*p != '\0' && strchr(whitespace, *p) != NULL) p++;


Cheers,
Yann
ps As I haven't said thanks yet, thank you very much for the great work with
PJMEDIA, it's a great library to work with.




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux