Fixed

Thanks Luca
On Aug 26, 2009, at 9:28 PM, [email protected] wrote:

There are four places in emitter.c where array language[] is searched for. However, the search is cross the array bound MAX_FLAG_LANGUGE.

I would suggest to two chages:

1.  Comparsion is LESS than < instead of "<=" to MAX_FLAG_LANGUGE
2.  Add  a break statement once a match is found.

--Xinan

PS: see the changes:

---------------------------------------------
if(strcasecmp(tmpStr, "language") == 0) {
 lang = DEFAULT_FLAG_LANGUAGE;

 for(j=1;j <MAX_FLAG_LANGUGE;j++) {   //! should be LESS THAN
    if(strcasecmp(&tmpStr[i+1], languages[j]) == 0) {
       lang = j;
       break;     //! Should stop when the first one is found
    }
 }
}

----------------------------------
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to