|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-04-24 04:30:24
Olaf van der Spek wrote:
> Hi,
>
> I think there's a bug in the program options library. It appears to
> dereference an invalid string iterator.
>
> libs\program_options\src\value_semantic.cpp:
> void validate(any& v, const vector<string>& xs, std::string*, int)
> {
> check_first_occurrence(v);
> string s(get_single_string(xs));
> if (*s.begin() == '\'' && *s.rbegin() == '\'' ||
> *s.begin() == '"' && *s.rbegin() == '"')
> v = any(s.substr(1, s.size()-2));
> else
> v = any(s);
> }
>
> A !s.empty() check should be added.
Hi Olaf,
the fix was just comitted, on trunk and on release branch.
Thanks for the report!
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk