New Defects reported by Coverity Scan for digiKam

scan-admin at coverity.com scan-admin at coverity.com
Sun Mar 13 18:48:13 GMT 2022


Hi,

Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.

22 new defect(s) introduced to digiKam found with Coverity Scan.
9 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 22 defect(s)


** CID 1503056:  Integer handling issues  (NEGATIVE_RETURNS)


________________________________________________________________________________________________________
*** CID 1503056:  Integer handling issues  (NEGATIVE_RETURNS)
/home/gilles/Devel/8.x/core/libs/dialogs/libsinfodlg.cpp: 341 in Digikam::LibsInfoDlg::LibsInfoDlg(QWidget *)()
335     
336         int res = memory.isValid();
337     
338         if (res > 0)
339         {
340             qint64 available = memory.bytes(KMemoryInfo::TotalRam);
>>>     CID 1503056:  Integer handling issues  (NEGATIVE_RETURNS)
>>>     "available" is passed to a parameter that cannot be negative.
341             new QTreeWidgetItem(m_features, QStringList() <<
342                                 i18nc(CONTEXT, "Memory available") << ItemPropertiesTab::humanReadableBytesCount(available));
343         }
344         else
345         {
346             new QTreeWidgetItem(m_features, QStringList() <<

** CID 1503055:    (TAINTED_SCALAR)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/fuji.cpp: 1037 in LibRaw::parse_fuji_thumbnail(int)()


________________________________________________________________________________________________________
*** CID 1503055:    (TAINTED_SCALAR)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/fuji.cpp: 1037 in LibRaw::parse_fuji_thumbnail(int)()
1031               {
1032                   if ((fread(buf, 1, xmpsz, ifp) == xmpsz) && !memcmp(buf, xmpmarker, xmpsz)) // got it
1033                   {
1034                       xmplen = len - xmpsz - 2;
1035                       xmpdata = (char*) malloc(xmplen+1);
1036                       fread(xmpdata, 1, xmplen, ifp);
>>>     CID 1503055:    (TAINTED_SCALAR)
>>>     Using tainted variable "this->imgdata.idata.xmplen" as an index to pointer "this->imgdata.idata.xmpdata".
1037                       xmpdata[xmplen] = 0;
1038                       break;
1039                   }
1040               }
1041               fseek(ifp, tpos + len, SEEK_SET);
1042             }
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/fuji.cpp: 1035 in LibRaw::parse_fuji_thumbnail(int)()
1029               int len = get2();
1030               if (len > xmpsz + 2)
1031               {
1032                   if ((fread(buf, 1, xmpsz, ifp) == xmpsz) && !memcmp(buf, xmpmarker, xmpsz)) // got it
1033                   {
1034                       xmplen = len - xmpsz - 2;
>>>     CID 1503055:    (TAINTED_SCALAR)
>>>     Passing tainted expression "this->imgdata.idata.xmplen + 1U" to "malloc", which uses it as an allocation size.
1035                       xmpdata = (char*) malloc(xmplen+1);
1036                       fread(xmpdata, 1, xmplen, ifp);
1037                       xmpdata[xmplen] = 0;
1038                       break;
1039                   }
1040               }

** CID 1503054:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/postprocessing_benchmark.cpp: 38 in main()


________________________________________________________________________________________________________
*** CID 1503054:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/postprocessing_benchmark.cpp: 38 in main()
32     
33     #include "libraw/libraw.h"
34     
35     void timerstart(void);
36     float timerend(void);
37     
>>>     CID 1503054:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
38     int main(int argc, char *argv[])
39     {
40       int i, ret, rep = 1;
41       LibRaw RawProcessor;
42     #ifdef OUT
43     #undef OUT

** CID 1503053:    (STRING_OVERFLOW)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/mediumformat.cpp: 459 in LibRaw::parse_mos(long long)()
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/mediumformat.cpp: 432 in LibRaw::parse_mos(long long)()
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/mediumformat.cpp: 441 in LibRaw::parse_mos(long long)()


________________________________________________________________________________________________________
*** CID 1503053:    (STRING_OVERFLOW)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/mediumformat.cpp: 459 in LibRaw::parse_mos(long long)()
453         }
454         if (!strcmp(data, "ShootObj_back_type"))
455         {
456           fscanf(ifp, "%d", &i);
457           if ((unsigned)i < sizeof mod / sizeof(*mod))
458           {
>>>     CID 1503053:    (STRING_OVERFLOW)
>>>     You might overrun the 64-character fixed-size string "this->imgdata.idata.model" by copying "mod[i]" without checking the length.
459             strcpy(model, mod[i]);
460             if (!strncmp(model, "AFi", 3))
461             {
462               ilm.CameraMount = LIBRAW_MOUNT_Rollei_bayonet;
463               ilm.CameraFormat = LIBRAW_FORMAT_66;
464             }
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/mediumformat.cpp: 432 in LibRaw::parse_mos(long long)()
426         {
427           char buffer[sizeof(imgdata.shootinginfo.BodySerial)];
428           char *words[4];
429           stmread(buffer, (unsigned)skip, ifp);
430           /*nwords = */
431               getwords(buffer, words, 4, sizeof(imgdata.shootinginfo.BodySerial));
>>>     CID 1503053:    (STRING_OVERFLOW)
>>>     You might overrun the 64-character fixed-size string "this->imgdata.shootinginfo.BodySerial" by copying "words[0]" without checking the length.
432           strcpy(imgdata.shootinginfo.BodySerial, words[0]);
433         }
434         if (!strcmp(data, "CaptProf_serial_number"))
435         {
436           char buffer[sizeof(imgdata.shootinginfo.InternalBodySerial)];
437           char *words[4];
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/mediumformat.cpp: 441 in LibRaw::parse_mos(long long)()
435         {
436           char buffer[sizeof(imgdata.shootinginfo.InternalBodySerial)];
437           char *words[4];
438           stmread(buffer, (unsigned)skip, ifp);
439           /*nwords =*/ getwords(buffer, words, 4,
440                             sizeof(imgdata.shootinginfo.InternalBodySerial));
>>>     CID 1503053:    (STRING_OVERFLOW)
>>>     You might overrun the 64-character fixed-size string "this->imgdata.shootinginfo.InternalBodySerial" by copying "words[0]" without checking the length.
441           strcpy(imgdata.shootinginfo.InternalBodySerial, words[0]);
442         }
443     
444         if (!strcmp(data, "JPEG_preview_data"))
445         {
446           thumb_offset = from;

** CID 1503052:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/openbayer_sample.cpp: 33 in main()


________________________________________________________________________________________________________
*** CID 1503052:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/openbayer_sample.cpp: 33 in main()
27     #include <unistd.h>
28     #include <fcntl.h>
29     #include <sys/stat.h>
30     #include <sys/mman.h>
31     #endif
32     
>>>     CID 1503052:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
33     int main(int ac, char *av[])
34     {
35       if (ac != 2)
36         return 1;
37       FILE *in = fopen(av[1], "rb");
38       fseek(in, 0, SEEK_END);

** CID 1503051:  Insecure data handling  (TAINTED_SCALAR)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 252 in LibRaw::parseCR3_CTMD(short)()


________________________________________________________________________________________________________
*** CID 1503051:  Insecure data handling  (TAINTED_SCALAR)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 252 in LibRaw::parseCR3_CTMD(short)()
246           err = -11;
247           goto ctmd_fin;
248         }
249         if ((tItem == 7) || (tItem == 8) || (tItem == 9))
250         {
251           relpos_inBox = relpos_inDir + 12L;
>>>     CID 1503051:  Insecure data handling  (TAINTED_SCALAR)
>>>     Using tainted variable "relpos_inDir + szItem" as a loop boundary.
252           while (relpos_inBox + 8 < relpos_inDir + szItem)
253           {
254             if (track.MediaOffset + relpos_inBox > ifp->size() - 8) // need at least 8 bytes
255             {
256                 err = -11;
257                 goto ctmd_fin;

** CID 1503050:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/mem_image_sample.cpp: 142 in main()


________________________________________________________________________________________________________
*** CID 1503050:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/mem_image_sample.cpp: 142 in main()
136           return;
137         fwrite(img->data, img->data_size, 1, f);
138         fclose(f);
139       }
140     }
141     
>>>     CID 1503050:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
142     int main(int ac, char *av[])
143     {
144       int i, ret, output_thumbs = 0;
145     #ifdef USE_JPEG
146       int output_jpeg = 0, jpgqual = 90;
147     #endif

** CID 1503049:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/simple_dcraw.cpp: 57 in main()


________________________________________________________________________________________________________
*** CID 1503049:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/simple_dcraw.cpp: 57 in main()
51         (char *)"66573312,4992,6668, 0, 0, 0, 0,0,148,0,0,Dalsa, FTF5066C 3:4",
52         (char *)"49840128,4992,4992, 0, 0, 0, 0,0,148,0,0,Dalsa, FTF5066C 1:1",
53         (char *)"37400064,4992,3746, 0, 0, 0, 0,0,148,0,0,Dalsa, FTF5066C 4:3",
54         (char *)"28035072,4992,2808, 0, 0, 0, 0,0,148,0,0,Dalsa, FTF5066C 16:9",
55         NULL};
56     
>>>     CID 1503049:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
57     int main(int ac, char *av[])
58     {
59       int i, ret, verbose = 0, output_thumbs = 0;
60     
61       // don't use fixed size buffers in real apps!
62       char outfn[1024], thumbfn[1024];

** CID 1503048:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/4channels.cpp: 36 in main()


________________________________________________________________________________________________________
*** CID 1503048:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/4channels.cpp: 36 in main()
30     #endif
31     
32     #ifdef LIBRAW_WIN32_CALLS
33     #define snprintf _snprintf
34     #endif
35     
>>>     CID 1503048:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
36     int main(int ac, char *av[])
37     {
38       int i, ret;
39       int autoscale = 0, black_subtraction = 1, use_gamma = 0;
40       char outfn[1024];
41     

** CID 1503047:  Control flow issues  (MISSING_RESTORE)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 298 in LibRaw::parseCR3_CTMD(short)()


________________________________________________________________________________________________________
*** CID 1503047:  Control flow issues  (MISSING_RESTORE)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 298 in LibRaw::parseCR3_CTMD(short)()
292         }
293         relpos_inDir += szItem;
294       }
295     
296     ctmd_fin:
297       order = s_order;
>>>     CID 1503047:  Control flow issues  (MISSING_RESTORE)
>>>     Value of non-local "this->libraw_internal_data.unpacker_data.order" that was saved in "q_order" is not restored as it was along other paths.
298       return err;
299     }
300     #undef track
301     
302     int LibRaw::parseCR3(INT64 oAtomList,
303                          INT64 szAtomList, short &nesting,

** CID 1503046:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1503046:  Null pointer dereferences  (FORWARD_NULL)
/home/gilles/Devel/8.x/core/showfoto/folderview/showfotofolderviewbookmarklist.cpp: 284 in ShowFoto::ShowfotoFolderViewBookmarkList::bookmarkExists(const QString &) const()
278         ShowfotoFolderViewBookmarkItem* item = nullptr;
279     
280         for (int i = 0 ; i < d->parent->topBookmarksItem()->childCount() ; ++i)
281         {
282             item = dynamic_cast<ShowfotoFolderViewBookmarkItem*>(d->parent->topBookmarksItem()->child(i));
283     
>>>     CID 1503046:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "item" to "path", which dereferences it.
284             if (path == item->path())
285             {
286                 found = true;
287                 break;
288             }
289         }

** CID 1503045:    (TAINTED_SCALAR)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 438 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 692 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 438 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 754 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()


________________________________________________________________________________________________________
*** CID 1503045:    (TAINTED_SCALAR)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 438 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
432       oAtom = oAtomList;
433       nesting++;
434       if (nesting > 31)
435         return -14; // too deep nesting
436       short s_order = order;
437     
>>>     CID 1503045:    (TAINTED_SCALAR)
>>>     Using tainted variable "oAtom + 8LL" as a loop boundary.
438       while ((oAtom + 8LL) <= (oAtomList + szAtomList))
439       {
440         lHdr = 0ULL;
441         err = 0;
442         order = 0x4d4d;
443         fseek(ifp, oAtom, SEEK_SET);
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 692 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
686             if(!current_track.stsc_data)
687             {
688               err =  -9;
689               goto fin;
690             }
691             current_track.stsc_count = entries;
>>>     CID 1503045:    (TAINTED_SCALAR)
>>>     Using tainted variable "entries" as a loop boundary.
692             for(int i = 0; i < entries; i++)
693             {
694               current_track.stsc_data[i].first = get4();
695               current_track.stsc_data[i].count = get4();
696               current_track.stsc_data[i].id = get4();
697             }
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 685 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
679             if (!entries)
680             {
681               err =  -9;
682               goto fin;
683             }
684     
>>>     CID 1503045:    (TAINTED_SCALAR)
>>>     Passing tainted expression "entries * 12UL" to "malloc", which uses it as an allocation size.
685             current_track.stsc_data = (crx_sample_to_chunk_t*) malloc(entries * sizeof(crx_sample_to_chunk_t));
686             if(!current_track.stsc_data)
687             {
688               err =  -9;
689               goto fin;
690             }
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 438 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
432       oAtom = oAtomList;
433       nesting++;
434       if (nesting > 31)
435         return -14; // too deep nesting
436       short s_order = order;
437     
>>>     CID 1503045:    (TAINTED_SCALAR)
>>>     Using tainted variable "oAtom + 8LL" as a loop boundary.
438       while ((oAtom + 8LL) <= (oAtomList + szAtomList))
439       {
440         lHdr = 0ULL;
441         err = 0;
442         order = 0x4d4d;
443         fseek(ifp, oAtom, SEEK_SET);
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 746 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
740             int i;
741             if (!entries)
742             {
743               err = -11;
744               goto fin;
745             }
>>>     CID 1503045:    (TAINTED_SCALAR)
>>>     Passing tainted expression "entries * 8UL" to "malloc", which uses it as an allocation size.
746             current_track.chunk_offsets = (INT64*)malloc(entries * sizeof(int64_t));
747             if(!current_track.chunk_offsets)
748             {
749               err = -11;
750               goto fin;
751             }
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 754 in LibRaw::parseCR3(long long, long long, short &, char *, short &, short &)()
748             {
749               err = -11;
750               goto fin;
751             }
752     
753             current_track.chunk_count = entries;
>>>     CID 1503045:    (TAINTED_SCALAR)
>>>     Using tainted variable "entries" as a loop boundary.
754             for (i = 0; i < entries; i++)
755               current_track.chunk_offsets[i] = (((int64_t)get4()) << 32) | get4();
756     
757             current_track.chunk_count = i;
758             current_track.MediaOffset =  current_track.chunk_offsets[0];
759           }

** CID 1503044:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/dcraw_emu.cpp: 238 in main()


________________________________________________________________________________________________________
*** CID 1503044:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/dcraw_emu.cpp: 238 in main()
232     	data.fsize = 0;
233     	data.fd = -1;
234     #endif
235     }
236     
237     
>>>     CID 1503044:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
238     int main(int argc, char *argv[])
239     {
240       if (argc == 1)
241         usage(argv[0]);
242     
243       LibRaw RawProcessor;

** CID 1503043:  Insecure data handling  (TAINTED_SCALAR)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/decoders/decoders_libraw_dcrdefs.cpp: 33 in LibRaw::sony_ljpeg_load_raw()()


________________________________________________________________________________________________________
*** CID 1503043:  Insecure data handling  (TAINTED_SCALAR)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/decoders/decoders_libraw_dcrdefs.cpp: 33 in LibRaw::sony_ljpeg_load_raw()()
27         if (tile_length < INT_MAX)
28           fseek(ifp, get4(), SEEK_SET);
29         if (!ljpeg_start(&jh, 0))
30           break;
31         try
32         {
>>>     CID 1503043:  Insecure data handling  (TAINTED_SCALAR)
>>>     Using tainted variable "(unsigned int)jh.high" as a loop boundary.
33           for (row = jrow = 0; jrow < (unsigned)jh.high; jrow++, row += 2)
34           {
35             checkCancel();
36             ushort(*rowp)[4] = (ushort(*)[4])ljpeg_row(jrow, &jh);
37             for (col = jcol = 0; jcol < (unsigned)jh.wide; jcol++, col += 2)
38             {

** CID 1503042:  Integer handling issues  (NO_EFFECT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 145 in LibRaw::selectCRXTrack()()


________________________________________________________________________________________________________
*** CID 1503042:  Integer handling issues  (NO_EFFECT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/src/metadata/cr3_parser.cpp: 145 in LibRaw::selectCRXTrack()()
139     	  return; // No RAW track index
140     
141       // Frame selected: parse CTMD metadata
142       for (int i = 0, trackcnt = 0; i <= maxTrack && i < LIBRAW_CRXTRACKS_MAXCOUNT; i++)
143       {
144     	  crx_data_header_t *d = &libraw_internal_data.unpacker_data.crx_header[i];
>>>     CID 1503042:  Integer handling issues  (NO_EFFECT)
>>>     This less-than-zero comparison of an unsigned value is never true. "0U > ((frame_select < d->sample_count) ? frame_select : d->sample_count)".
145     	  int fsel = LIM(frame_select, 0, d->sample_count);
146     	  if (d->MediaType == 3) // CTMD metadata
147     	  {
148     		  /* ignore errors !*/
149     		  if (fsel)
150     			  selectCRXFrame(i, fsel);

** CID 1503041:    (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/tests/rawengine/raw2png_cli.cpp: 40 in main()
/home/gilles/Devel/8.x/core/tests/rawengine/raw2png_cli.cpp: 40 in main()


________________________________________________________________________________________________________
*** CID 1503041:    (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/tests/rawengine/raw2png_cli.cpp: 40 in main()
34     #include "digikam_debug.h"
35     #include "drawdecoder.h"
36     #include "drawdecodersettings.h"
37     
38     using namespace Digikam;
39     
>>>     CID 1503041:    (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
40     int main(int argc, char** argv)
41     {
42         if (argc != 2)
43         {
44             qCDebug(DIGIKAM_TESTS_LOG) << "raw2png - RAW Camera Image to PNG Converter";
45             qCDebug(DIGIKAM_TESTS_LOG) << "Usage: <rawfile>";
/home/gilles/Devel/8.x/core/tests/rawengine/raw2png_cli.cpp: 40 in main()
34     #include "digikam_debug.h"
35     #include "drawdecoder.h"
36     #include "drawdecodersettings.h"
37     
38     using namespace Digikam;
39     
>>>     CID 1503041:    (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
40     int main(int argc, char** argv)
41     {
42         if (argc != 2)
43         {
44             qCDebug(DIGIKAM_TESTS_LOG) << "raw2png - RAW Camera Image to PNG Converter";
45             qCDebug(DIGIKAM_TESTS_LOG) << "Usage: <rawfile>";

** CID 1503040:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/multirender_test.cpp: 63 in main()


________________________________________________________________________________________________________
*** CID 1503040:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/multirender_test.cpp: 63 in main()
57     
58       if (LIBRAW_SUCCESS != (ret = RawProcessor.dcraw_ppm_tiff_writer(outfn)))
59         fprintf(stderr, "Cannot write %s: %s\n", outfn, libraw_strerror(ret));
60       return ret;
61     }
62     
>>>     CID 1503040:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
63     int main(int ac, char *av[])
64     {
65       int i, ret;
66     
67       LibRaw RawProcessor;
68       if (ac < 2)

** CID 1503039:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/unprocessed_raw.cpp: 49 in main()


________________________________________________________________________________________________________
*** CID 1503039:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/unprocessed_raw.cpp: 49 in main()
43     void gamma_curve(unsigned short curve[]);
44     void write_ppm(unsigned width, unsigned height, unsigned short *bitmap,
45                    const char *basename);
46     void write_tiff(int width, int height, unsigned short *bitmap,
47                     const char *basename);
48     
>>>     CID 1503039:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
49     int main(int ac, char *av[])
50     {
51       int i, ret;
52       int verbose = 1, autoscale = 0, use_gamma = 0, out_tiff = 0;
53       char outfn[1024];
54     

** CID 1503038:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 56 in main()


________________________________________________________________________________________________________
*** CID 1503038:  Error handling issues  (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 56 in main()
50     class LibRaw_bl : public LibRaw
51     {
52     	public:
53     		void adjust_blacklevel() { LibRaw::adjust_bl(); }
54     };
55     
>>>     CID 1503038:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "dng_exception" is thrown and never caught.
56     int main(int ac, char *av[])
57     {
58     	if (ac < 4)
59     	{
60     		usage(av[0]);
61     		exit(1);

** CID 1485985:    (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
/home/gilles/Devel/8.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
/home/gilles/Devel/8.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
/home/gilles/Devel/8.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()


________________________________________________________________________________________________________
*** CID 1485985:    (UNCAUGHT_EXCEPT)
/home/gilles/Devel/8.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
48     #include "digikam_version.h"
49     
50     using namespace Digikam;
51     
52     const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53     
>>>     CID 1485985:    (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54     int main(int argc, char** argv)
55     {
56         QApplication app(argc, argv);
57     
58         if (argc != 2)
59         {
/home/gilles/Devel/8.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
48     #include "digikam_version.h"
49     
50     using namespace Digikam;
51     
52     const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53     
>>>     CID 1485985:    (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54     int main(int argc, char** argv)
55     {
56         QApplication app(argc, argv);
57     
58         if (argc != 2)
59         {
/home/gilles/Devel/8.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
48     #include "digikam_version.h"
49     
50     using namespace Digikam;
51     
52     const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53     
>>>     CID 1485985:    (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54     int main(int argc, char** argv)
55     {
56         QApplication app(argc, argv);
57     
58         if (argc != 2)
59         {
/home/gilles/Devel/8.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
48     #include "digikam_version.h"
49     
50     using namespace Digikam;
51     
52     const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53     
>>>     CID 1485985:    (UNCAUGHT_EXCEPT)
>>>     In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54     int main(int argc, char** argv)
55     {
56         QApplication app(argc, argv);
57     
58         if (argc != 2)
59         {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp2OAl-2Fauo86CB28HCT0-2BnD-2F6eFMYt863B1-2B0FLvU5y-2FRWSl8rMA4vGwCkGPp0f1hg-3DigV7_IpEMwFcbl-2BY9RHaL2m6a3nuAxB4hfm4MTniX0gHjADVyzaC04KXCQUTJjXFio4olPaZcXKmiWLUQ8Yr6XSW6ZWv9eT1hy8pzeRNzv7TpiPG90-2B6GClOLyXfLRTeLfNT68HNbc2IHNtYY5vC8tJhlNjBOU9L4-2BM-2BsHFk2svq4UwrUrX0SqxL9raqIE9tlgQfsmVMlOKlqpurbWVWTvttSGQ-3D-3D



More information about the Digikam-devel mailing list