[Date Prev][Date Next]
Re: (ITS#6338) dnParent(x, x) can remove \0-termination
> Full_Name: Hallvard B Furuseth
> Version: HEAD, RE24
> Submission from: (NULL) (184.108.40.206)
> Submitted by: hallvard
> struct berval x = BER_BVC("cn=foo");
> dnParent(x, x);
> keeps x.bv_val pointing at "cn=foo" instead of at the \0
> behind it. bv_len is correctly set to 0 though.
Could be sort of intentional. As far as I remember, dnParent() is
supposed to leave the second argument untouched, as it is often used on
read-only data. Probably, the most appropriate fix consists in passing
a temporary as the first argument.