Skip to content

Conversation

@AverageBeerEnjoyer
Copy link

This code produces segfault

#include "croncpp.h"
#include <chrono>

using namespace cron;
using namespace std;

int main() { 
    cronexpr expr;
    auto tp = chrono::system_clock::now();
    auto next = cron::cron_next(expr, tp);
}

due to endless recursion in

template <typename Traits>
static bool find_next(cronexpr const & cex,
                      std::tm& date,
                      size_t const dot)

I added an initialization check based on emptiness of cronexpr::expr, which is always not empty when cronexpr is initialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant