Boost logo

Boost Users :

From: Richard Buckle (richard.buckle_at_[hidden])
Date: 2008-02-11 12:05:53


Hello,

I'm using Boost 1.34.1 with Visual Studio 2005 SP1. I've found that if
the posix_time_zone constructor is invoked with certain types of invalid
time zone string, the application crashes with an attempt to dereference
an invalid iterator. Examples of strings that do this are strings with
no digits, e.g. "UTC" and strings with a daylight saving time named but
no changeover rules, such as "GMT0BST".

This is a problem for us as in our application the time zone string is
input by the user, and we need to fail gracefully if the user naively
supplies an invalid string such as the two above.

I think this is easily fixed by testing the iterators against end(),
although I'm not quite sure which exception to throw in this case.

Any ideas?

TIA,
Richard.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net