The string retrocl_attributes[i] in the following code (retrocl.c:360) is not null terminated: retrocl_attributes[i] = slapi_ch_malloc(pos-value+1); strncpy(retrocl_attributes[i], value, pos-value); According to the strncpy() manual, if there is no null byte among the first n bytes of src, the string placed in dest will not be null terminated, which is the case here. It can be fixed by adding this code: retrocl_attributes[i][pos-value] = NULL;
Created attachment 385723 [details] Patch
To ssh://git.fedorahosted.org/git/389/ds.git f6d937e..9f91c67 master -> master commit 9f91c67cfc9de5378527cfdb497cd11d9df1a54b Author: Endi S. Dewata <edewata> Date: Tue Jan 19 15:49:52 2010 -0600 Bug 557185 - Unterminated string after strncpy in Retro Changelog Plugin According to the strncpy() manual, if there is no null byte among the first n bytes of src, the string placed in dest will not be null terminated. To fix the problem the null byte should be added manually. Reviewed by: rmeggins Pushed by: rmeggins
Yes. I have added the automated test cases to tet under cl5 test suit: mmrepl cl5 startup 100% (1/1) mmrepl cl5 run 100% (3/3) mmrepl cl5 cleanup 100% (1/1) hence marking VERIFIED.