Bug 661792 - Valid managed entry config rejected
The attribute mapping parsing code in the managed entries plug-in
can access the wrong memory when trying to parse the post-macro
portion of a mapping value when no post string exists. When the
macro is at the end of the mapping value, we were setting post_str
to an empty constant string. The code that later parses post_str
expects post_str to be contained within the actual mapping value
string. This is not the case when we have set post_str to point
to a constant emptry string, so we end up parsing through memory
that we shouldn't.
The fix is to set post_str to NULL when there is no post string.
We can then skip post string parsing when post_str is not set.