New Defects reported by Coverity Scan for digiKam
scan-admin at coverity.com
scan-admin at coverity.com
Sun Mar 10 12:20:24 GMT 2024
Hi,
Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.
54 new defect(s) introduced to digiKam found with Coverity Scan.
89 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 20 of 54 defect(s)
** CID 1593062: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/geodata/data/GeoDataLatLonBox.h: 46 in ()
________________________________________________________________________________________________________
*** CID 1593062: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/geodata/data/GeoDataLatLonBox.h: 46 in ()
40 *
41 * If the GeoDataLatLonBox does not cover the whole longitude range but still
42 * crosses the date line then the eastern boundary has got a smaller value than
43 * the western one.
44 */
45
>>> CID 1593062: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "Marble::GeoDataLatLonBox" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
46 class DIGIKAM_EXPORT GeoDataLatLonBox : public GeoDataObject
47 {
48 friend bool DIGIKAM_EXPORT operator==( GeoDataLatLonBox const& lhs, GeoDataLatLonBox const& rhs );
49 friend bool DIGIKAM_EXPORT operator!=( GeoDataLatLonBox const& lhs, GeoDataLatLonBox const& rhs );
50
51 public:
** CID 1593061: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/facesengine/facedb/facedb_dnn_spatial.cpp: 240 in Digikam::FaceDb::findParentTreeDb(const cv::Mat &, bool &, int &) const()
________________________________________________________________________________________________________
*** CID 1593061: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/facesengine/facedb/facedb_dnn_spatial.cpp: 240 in Digikam::FaceDb::findParentTreeDb(const cv::Mat &, bool &, int &) const()
234 {
235 currentNode = right;
236 leftChild = false;
237 }
238 else
239 {
>>> CID 1593061: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "left" is copied in a call to copy assignment "operator =", when it could be moved instead.
240 currentNode = left;
241 leftChild = true;
242 }
243
244 updateRangeTreeDb(parent, minRange, maxRange, nodePos);
245 }
** CID 1593060: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/advancedrename/advancedrenamemanager.cpp: 290 in Digikam::AdvancedRenameManager::parseFiles(const QString &, const Digikam::ParseSettings &)()
________________________________________________________________________________________________________
*** CID 1593060: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/advancedrename/advancedrenamemanager.cpp: 290 in Digikam::AdvancedRenameManager::parseFiles(const QString &, const Digikam::ParseSettings &)()
284 d->parser->reset();
285
286 Q_FOREACH (const QString& file, d->files)
287 {
288 QUrl url = QUrl::fromLocalFile(file);
289 ParseSettings settings = _settings;
>>> CID 1593060: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "url" is copied in a call to copy assignment "operator =", when it could be moved instead.
290 settings.fileUrl = url;
291 settings.parseString = parseString;
292 settings.startIndex = d->startIndex;
293 settings.manager = this;
294
295 d->renamedFiles[file] = d->parser->parse(settings);
** CID 1593059: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/geolocation/geoiface/bookmark/bookmarksdlg.cpp: 399 in Digikam::BookmarksDialog::slotOpenInMap(const QModelIndex &)()
________________________________________________________________________________________________________
*** CID 1593059: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/geolocation/geoiface/bookmark/bookmarksdlg.cpp: 399 in Digikam::BookmarksDialog::slotOpenInMap(const QModelIndex &)()
393 {
394 GPSItemInfo gpsInfo;
395 gpsInfo.coordinates = coordinate;
396 gpsInfo.dateTime = item.sibling(index.row(), 1)
397 .data(BookmarksModel::DateAddedRole).toDateTime();
398 gpsInfo.rating = -1;
>>> CID 1593059: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "url" is copied in a call to copy assignment "operator =", when it could be moved instead.
399 gpsInfo.url = url;
400 ilst << gpsInfo;
401 }
402 }
403
404 d->mapView->setGPSInfoList(GPSItemInfo::List() << ilst);
** CID 1593058: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp: 423 in DigikamGenericPresentationPlugin::PresentationWidget::loadNextImage()()
________________________________________________________________________________________________________
*** CID 1593058: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp: 423 in DigikamGenericPresentationPlugin::PresentationWidget::loadNextImage()()
417 QPainter p(&pixmap);
418
419 p.drawPixmap((width() - newPixmap.width()) / 2,
420 (height() - newPixmap.height()) / 2, newPixmap,
421 0, 0, newPixmap.width(), newPixmap.height());
422
>>> CID 1593058: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "pixmap" is copied in a call to copy assignment "operator =", when it could be moved instead.
423 d->currImage = pixmap;
424
425 if (img.isNull())
426 {
427
428 #ifdef HAVE_MEDIAPLAYER
** CID 1593057: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/advancedrename/common/parser.cpp: 344 in Digikam::Parser::applyModifiers(const Digikam::ParseSettings &, Digikam::ParseResults &)()
________________________________________________________________________________________________________
*** CID 1593057: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/advancedrename/common/parser.cpp: 344 in Digikam::Parser::applyModifiers(const Digikam::ParseSettings &, Digikam::ParseResults &)()
338 QString modResult;
339
340 if (mod)
341 {
342 settings.parseString = modToken;
343 settings.currentResultsKey = key;
>>> CID 1593057: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "str2Modify" is copied in a call to copy assignment "operator =", when it could be moved instead.
344 settings.str2Modify = str2Modify;
345 ParseResults modResults = mod->parse(settings);
346
347 if (!modResults.isEmpty() && (modResults.values().length() == 1))
348 {
349 modResult = modResults.result(modResults.keys().constFirst());
** CID 1593056: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/core/MarbleWidgetPopupMenu.cpp: 177 in Marble::MarbleWidgetPopupMenu::Private::setupDialogOsm(Marble::PopupLayer *, const Marble::GeoDataPlacemark *)()
________________________________________________________________________________________________________
*** CID 1593056: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/core/MarbleWidgetPopupMenu.cpp: 177 in Marble::MarbleWidgetPopupMenu::Private::setupDialogOsm(Marble::PopupLayer *, const Marble::GeoDataPlacemark *)()
171 if (natural == QLatin1String("Peak")) {
172 QString elevation = data.tagValue(QStringLiteral("ele"));
173 if (!elevation.isEmpty()) {
174 natural = natural + QLatin1String(" - ") + elevation + QLatin1String(" m");
175 }
176 }
>>> CID 1593056: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "natural" is copied in a call to copy assignment "operator =", when it could be moved instead.
177 doc[QStringLiteral("details")] = natural;
178 } else {
179 doc[QStringLiteral("detailsVisibility")] = none;
180 }
181
182 QString amenity;
** CID 1593055: Error handling issues (CHECKED_RETURN)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/plugins/runner/pnt/PntRunner.cpp: 52 in Marble::PntRunner::parseFile(const QString &, Marble::DocumentRole, QString &)()
________________________________________________________________________________________________________
*** CID 1593055: Error handling issues (CHECKED_RETURN)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/plugins/runner/pnt/PntRunner.cpp: 52 in Marble::PntRunner::parseFile(const QString &, Marble::DocumentRole, QString &)()
46 if ( !file.exists() ) {
47 errorString = QStringLiteral("File %1 does not exist").arg(fileName);
48 qCDebug(DIGIKAM_MARBLE_LOG) << errorString;
49 return nullptr;
50 }
51
>>> CID 1593055: Error handling issues (CHECKED_RETURN)
>>> Calling "open" without checking return value (as is done elsewhere 94 out of 95 times).
52 file.open( QIODevice::ReadOnly );
53 QDataStream stream( &file ); // read the data serialized from the file
54 stream.setByteOrder( QDataStream::LittleEndian );
55
56 GeoDataDocument *document = new GeoDataDocument();
57 document->setDocumentRole( role );
** CID 1593054: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/advancedrename/advancedrenamemanager.cpp: 370 in Digikam::AdvancedRenameManager::initializeFileList()()
________________________________________________________________________________________________________
*** CID 1593054: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/advancedrename/advancedrenamemanager.cpp: 370 in Digikam::AdvancedRenameManager::initializeFileList()()
364
365 if ((d->sortAction != SortCustom) && (d->sortDirection == SortDescending))
366 {
367 std::reverse(tmpFiles.begin(), tmpFiles.end());
368 }
369
>>> CID 1593054: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "tmpFiles" is copied in a call to copy assignment "operator =", when it could be moved instead.
370 d->files = tmpFiles;
371 }
372
373 QStringList AdvancedRenameManager::fileList() const
374 {
375 return d->files;
** CID 1593053: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/view/slideshow/widgets/slideproperties.cpp: 177 in DigikamGenericSlideShowPlugin::SlideProperties::paintEvent(QPaintEvent *)()
________________________________________________________________________________________________________
*** CID 1593053: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/view/slideshow/widgets/slideproperties.cpp: 177 in DigikamGenericSlideShowPlugin::SlideProperties::paintEvent(QPaintEvent *)()
171 str.clear();
172
173 QString lens = item.lens();
174
175 if (!lens.isEmpty())
176 {
>>> CID 1593053: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "lens" is copied in a call to copy assignment "operator =", when it could be moved instead.
177 str = lens;
178 printInfoText(p, offset, str);
179 }
180 }
181
182 // Display Exposure and Sensitivity.
** CID 1593052: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/core/MarbleWidgetPopupMenu.cpp: 381 in Marble::MarbleWidgetPopupMenu::Private::setupDialogCity(Marble::PopupLayer *, const Marble::GeoDataPlacemark *)()
________________________________________________________________________________________________________
*** CID 1593052: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/core/MarbleWidgetPopupMenu.cpp: 381 in Marble::MarbleWidgetPopupMenu::Private::setupDialogCity(Marble::PopupLayer *, const Marble::GeoDataPlacemark *)()
375 placemark->extendedData().value(QStringLiteral("dst")).value().toInt()) /
376 ( double ) 100, 0, 'f', 1 );
377 // There is an issue about UTC.
378 // It's possible to variants (e.g.):
379 // +1.0 and -1.0, but dst does not have + an the start
380 if (dst.startsWith(QLatin1Char('-'))) {
>>> CID 1593052: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "dst" is copied in a call to copy assignment "operator =", when it could be moved instead.
381 doc[QString::fromUtf8("timezone")] = dst;
382 } else {
383 doc[QString::fromUtf8("timezone")] = QLatin1Char('+') + dst;
384 }
385
386 const QString flagPath = MarbleDirs::path(
** CID 1593051: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/core/MarbleWidgetPopupMenu.cpp: 270 in Marble::MarbleWidgetPopupMenu::Private::setupDialogOsm(Marble::PopupLayer *, const Marble::GeoDataPlacemark *)()
________________________________________________________________________________________________________
*** CID 1593051: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/core/MarbleWidgetPopupMenu.cpp: 270 in Marble::MarbleWidgetPopupMenu::Private::setupDialogOsm(Marble::PopupLayer *, const Marble::GeoDataPlacemark *)()
264 if (!websiteData.isEmpty()) {
265 break;
266 }
267 }
268 if (!websiteData.isEmpty()) {
269 hasContactsData = true;
>>> CID 1593051: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "websiteData" is copied in a call to copy assignment "operator =", when it could be moved instead.
270 doc[QStringLiteral("website")] = websiteData;
271 } else {
272 doc[QStringLiteral("websiteVisibility")] = none;
273 }
274
275 if (!hasContactsData) {
** CID 1593050: Performance inefficiencies (AUTO_CAUSES_COPY)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/layers/PlacemarkLayout.cpp: 385 in Marble::PlacemarkLayout::generateLayout(const Marble::ViewportParams *, int)()
________________________________________________________________________________________________________
*** CID 1593050: Performance inefficiencies (AUTO_CAUSES_COPY)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/layers/PlacemarkLayout.cpp: 385 in Marble::PlacemarkLayout::generateLayout(const Marble::ViewportParams *, int)()
379 m_lastPlacemarkSymbolRect = QRectF();
380 m_labelArea = 0;
381
382 // First handle the selected placemarks as they have the highest priority.
383
384 const QModelIndexList selectedIndexes = m_selectionModel->selection().indexes();
>>> CID 1593050: Performance inefficiencies (AUTO_CAUSES_COPY)
>>> Using the "auto" keyword without an "&" causes the copy of an object of type "Marble::GeoDataLatLonAltBox".
385 auto const viewLatLonAltBox = viewport->viewLatLonAltBox();
386
387 for ( int i = 0; i < selectedIndexes.count(); ++i ) {
388 const QModelIndex index = selectedIndexes.at( i );
389 const GeoDataPlacemark *placemark = static_cast<GeoDataPlacemark*>(qvariant_cast<GeoDataObject*>(index.data( MarblePlacemarkModel::ObjectPointerRole ) ));
390 const GeoDataCoordinates coordinates = placemarkIconCoordinates( placemark );
** CID 1593049: Error handling issues (CHECKED_RETURN)
/home/gilles/Devel/8.x/core/dplugins/generic/metadata/geolocationedit/kmlexport/kmlexport.cpp: 233 in DigikamGenericGeolocationEditPlugin::KmlExport::generateImagesthumb(const QUrl &, QDomElement &)()
________________________________________________________________________________________________________
*** CID 1593049: Error handling issues (CHECKED_RETURN)
/home/gilles/Devel/8.x/core/dplugins/generic/metadata/geolocationedit/kmlexport/kmlexport.cpp: 233 in DigikamGenericGeolocationEditPlugin::KmlExport::generateImagesthumb(const QUrl &, QDomElement &)()
227 lat = info.latitude();
228 lng = info.longitude();
229 alt = info.altitude();
230 }
231 else if (m_meta->load(imageURL.toLocalFile()))
232 {
>>> CID 1593049: Error handling issues (CHECKED_RETURN)
>>> Calling "getGPSInfo" without checking return value (as is done elsewhere 4 out of 5 times).
233 m_meta->getGPSInfo(alt, lat, lng);
234 }
235
236 QDomElement kmlPlacemark = addKmlElement(kmlAlbum, QLatin1String("Placemark"));
237 addKmlTextElement(kmlPlacemark, QLatin1String("name"), fullFileName);
238
** CID 1593048: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/onlineversion/onlineversiondwnl.cpp: 247 in Digikam::OnlineVersionDwnl::slotDownloaded(QNetworkReply *)()
________________________________________________________________________________________________________
*** CID 1593048: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/onlineversion/onlineversiondwnl.cpp: 247 in Digikam::OnlineVersionDwnl::slotDownloaded(QNetworkReply *)()
241 qCDebug(DIGIKAM_GENERAL_LOG) << "Checksum is invalid";
242 Q_EMIT signalDownloadError(i18n("Checksum is invalid."));
243
244 return;
245 }
246
>>> CID 1593048: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "sums" is copied in a call to copy assignment "operator =", when it could be moved instead.
247 d->checksums = sums;
248 qCDebug(DIGIKAM_GENERAL_LOG) << "Checksum is" << d->checksums;
249
250 d->redirects = 0;
251 download(QUrl(d->currentUrl.remove(QLatin1String(".sha256"))));
252
** CID 1593047: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/database/coredb/coredbwatch.cpp: 127 in Digikam::DBusSignalListenerThread::run()()
________________________________________________________________________________________________________
*** CID 1593047: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/database/coredb/coredbwatch.cpp: 127 in Digikam::DBusSignalListenerThread::run()()
121 d->connectWithDBus("signalImageTagChangeDBus", q,
122 SLOT(slotImageTagChangeDBus(QString,QString,Digikam::ImageTagChangeset)),
123 threadConnection);
124
125 d->connectWithDBus("signalAlbumRootChangeDBus", q,
126 SLOT(slotAlbumRootChangeDBus(QString,QString,Digikam::AlbumRootChangeset)),
>>> CID 1593047: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "threadConnection" is passed-by-value as parameter to "connectWithDBus" when it could be moved instead.
127 threadConnection);
128
129 // enter thread event loop
130
131 exec();
132 }
** CID 1593046: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/widgets/itemview/ditemdelegate.cpp: 168 in Digikam::DItemDelegate::makeDragPixmap(const QStyleOptionViewItem &, const QList<QModelIndex> &, double, const QPixmap &)()
________________________________________________________________________________________________________
*** CID 1593046: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/widgets/itemview/ditemdelegate.cpp: 168 in Digikam::DItemDelegate::makeDragPixmap(const QStyleOptionViewItem &, const QList<QModelIndex> &, double, const QPixmap &)()
162 QRect r1 = p.boundingRect(pixmapRect, Qt::AlignLeft | Qt::AlignTop, text1).adjusted(0, 0, 1, 1);
163 QRect r2 = p.boundingRect(pixmapRect, Qt::AlignLeft | Qt::AlignTop, text2).adjusted(0, 0, 1, 1);
164
165 if ((r2.width() > pixmapRect.width()) || (r2.height() > pixmapRect.height()))
166 {
167 // textRect = r1;
>>> CID 1593046: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "text1" is copied in a call to copy assignment "operator =", when it could be moved instead.
168 text = text1;
169 int rectSize = qMax(r1.width(), r1.height());
170 textRect = QRect(0, 0, rectSize, rectSize);
171 }
172 else
173 {
** CID 1593045: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/view/slideshow/widgets/slideproperties.cpp: 134 in DigikamGenericSlideShowPlugin::SlideProperties::paintEvent(QPaintEvent *)()
________________________________________________________________________________________________________
*** CID 1593045: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/view/slideshow/widgets/slideproperties.cpp: 134 in DigikamGenericSlideShowPlugin::SlideProperties::paintEvent(QPaintEvent *)()
128 }
129
130 // Display Comments.
131
132 if (d->settings->printComment)
133 {
>>> CID 1593045: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "comment" is copied in a call to copy assignment "operator =", when it could be moved instead.
134 str = comment;
135 printComments(p, offset, str);
136 }
137
138 // Display Make and Model.
139
** CID 1593044: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp: 474 in DigikamGenericPresentationPlugin::PresentationWidget::loadPrevImage()()
________________________________________________________________________________________________________
*** CID 1593044: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp: 474 in DigikamGenericPresentationPlugin::PresentationWidget::loadPrevImage()()
468 QPainter p(&pixmap);
469
470 p.drawPixmap((width() - newPixmap.width()) / 2,
471 (height() - newPixmap.height()) / 2, newPixmap,
472 0, 0, newPixmap.width(), newPixmap.height());
473
>>> CID 1593044: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "pixmap" is copied in a call to copy assignment "operator =", when it could be moved instead.
474 d->currImage = pixmap;
475
476 if (img.isNull())
477 {
478
479 #ifdef HAVE_MEDIAPLAYER
** CID 1593043: Null pointer dereferences (FORWARD_NULL)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/storage/DownloadRegion.cpp: 51 in Marble::DownloadRegionPrivate::rad2PixelX(double, const Marble::TileLayer *) const()
________________________________________________________________________________________________________
*** CID 1593043: Null pointer dereferences (FORWARD_NULL)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/storage/DownloadRegion.cpp: 51 in Marble::DownloadRegionPrivate::rad2PixelX(double, const Marble::TileLayer *) const()
45 }
46
47 // copied from AbstractScanlineTextureMapper and slightly adjusted
48 int DownloadRegionPrivate::rad2PixelX( qreal const lon, const TileLayer *tileLayer ) const
49 {
50 qreal tileWidth = tileLayer && tileLayer->layerCount() > 0 ? tileLayer->tileSize().width() : 256;
>>> CID 1593043: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "tileLayer" to "tileColumnCount", which dereferences it. (The dereference happens because this is a virtual function call.)
51 qreal const globalWidth = tileWidth * tileLayer->tileColumnCount( m_visibleTileLevel );
52 return static_cast<int>(globalWidth * 0.5 * (1 + lon / M_PI));
53 }
54
55 // copied from AbstractScanlineTextureMapper and slightly adjusted
56 int DownloadRegionPrivate::rad2PixelY( qreal const lat, const TileLayer *tileLayer ) const
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4yJUfIaFVfulX1EnArvLvmGJ18AyhOhOJnWywYkUuR-2BHL458rbL5b5DiAzhSjilZ8-3DIcTj_wUwU8mg96yc-2FA1IAMQ6mJ-2FFdQ9EM-2BFY-2BXFbSpXNYnfwuJ4VUNNzTsH2b-2F6X-2FCL04U3w9szKFt9ChTVqUTqe-2BgDyMF72mu-2BZ2eXqc5Eddtv5iPwrjOyy7wO4GZE7fhACgNCMa1VIYR29cTqYQMnXt9WJdUL-2FcgPu-2BIi01fZ9wBjOwb-2B6tDS-2FrR-2FUbd4T-2Ffl-2F8Yz9AUHL3ZQEg-2BWjz49HQUQ-3D-3D
More information about the Digikam-devel
mailing list