mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-26 02:40:43 -06:00
Check source parameter to GncQuotesImpl::report() is not null
The "source" parameter is checked once at the start before using strcmp() but is then used later on in GncQuotesImpl::query_fq() with function calls that can't handle null values.
This commit is contained in:
parent
4b83068c6b
commit
fe526a6043
@ -329,7 +329,10 @@ void
|
||||
GncQuotesImpl::report (const char* source, const StrVec& commodities,
|
||||
bool verbose)
|
||||
{
|
||||
bool is_currency{source && strcmp(source, "currency") == 0};
|
||||
if (!source)
|
||||
throw (GncQuoteException(bl::translate("GncQuotes::Report called with no source.")));
|
||||
|
||||
bool is_currency{strcmp(source, "currency") == 0};
|
||||
m_failures.clear();
|
||||
if (commodities.empty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user