0db15ea Resolves: bug 413531

Authored and Committed by rmeggins 15 years ago
    Resolves: bug 413531
    Bug Description: Web browser accepted languages configuration causes dsgw CGI binaries to segfault
    Reviewed by: nhosoi (Thanks!)
    Files: ldapserver/lib/libsi18n/acclanglist.c adminserver/lib/libsi18n/acclanglist.c
    Branch: Directory71RtmBranch
    Fix Description: The CGI code looks for localized files using the following order: /path/lang_co, /path/lang, /path/"en".  It uses the HTTP Accept-Language string to look for languages the user wants, in the order that the user wants.  The user may specify "fr_CA, fr_FR, fr_BE" for example - the user does not have to specify "fr".  But we want to use /path/"fr" in that case, if we don't have /path/"fr_CA" nor any of the other lang_co directories.  The code in XP_AccLangList attempts to scan through the parsed list and add the two char lang codes if they are not already in the list.  However, the code that appended them did not check for buffer overflow  The new code, while not being quite as efficient as the old code, does correctly check for overflow and should be easier to read.
    Platforms tested: RHEL5, HP-UX
    Flag Day: no
    Doc impact: no
    QA impact: Yes
    New Tests integrated into TET: Yes - we should add something to the Admin Server and DSGW test plans to test this case.
    
        
file modified
+67 -35