summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
83c5914)
(Silently) ignore invalid -l loglevel specs. This avoids a crash
reported in bug #1071.
case 'l':
{
const int loglevel = atoi(optarg);
case 'l':
{
const int loglevel = atoi(optarg);
+ if (loglevel < 0 || loglevel > 5) {
+ qDebug() << "ERROR: invalid log level spec.";
+ break;
+ }
context->set_log_level(sigrok::LogLevel::get(loglevel));
#ifdef ENABLE_DECODE
context->set_log_level(sigrok::LogLevel::get(loglevel));
#ifdef ENABLE_DECODE