1e0dc9e Revert "Revert "Ticket #47835 - Coverity: 12687..12692""

Authored and Committed by nhosoi 9 years ago
    Revert "Revert "Ticket #47835 - Coverity: 12687..12692""
    
    This reverts commit 8247976f25c22799a31be08074cc150e07f5dcce.
    
    Note: It turned out this patch is necessary even if Coverity filter is enhanced.
    
    12692 - Use of untrusted string value
    Description: lines read from the sysconfig reload task's attribute
    sysconfigfile (e.g., /etc/sysconfig/dirsrv-localhost) could be tainted.
    Check the end of the line more rigorously, and eliminate a chance to
    overflow env_var and env_value by copying the characters from read
    line.
    
    Reviewed by rmeggins@redhat.com (Thanks, Rich!)
    
    https://fedorahosted.org/389/ticket/47835
    
        
file modified
+6 -4