poppler-24.08.0-1.fc42

List of Findings

Error: CPPCHECK_WARNING (CWE-227): [#def1]
poppler-24.08.0-build/poppler-24.08.0/glib/poppler-document.cc:2967: error[stlcstr]: Dangerous usage of c_str(). The value returned by c_str() is invalid after this call.
# 2965|       const std::string &encoding = info->getEncoding();
# 2966|       if (!encoding.empty()) {
# 2967|->         return encoding.c_str();
# 2968|       } else {
# 2969|           return nullptr;

Error: COMPILER_WARNING (CWE-457): [#def2]
poppler-24.08.0-build/poppler-24.08.0/glib/poppler-page.cc: scope_hint: In function ‘poppler_page_get_text_layout_for_area’
poppler-24.08.0-build/poppler-24.08.0/glib/poppler-page.cc:2340:21: warning[-Wmaybe-uninitialized]: ‘x2’ may be used uninitialized
# 2340 |     gdouble x1, y1, x2, y2;
#      |                     ^~
# 2338|       guint offset = 0;
# 2339|       guint n_rects = 0;
# 2340|->     gdouble x1, y1, x2, y2;
# 2341|       gdouble x3, y3, x4, y4;
# 2342|       int n_lines;

Error: COMPILER_WARNING (CWE-457): [#def3]
poppler-24.08.0-build/poppler-24.08.0/glib/poppler-page.cc:2340:25: warning[-Wmaybe-uninitialized]: ‘y2’ may be used uninitialized
# 2340 |     gdouble x1, y1, x2, y2;
#      |                         ^~
# 2338|       guint offset = 0;
# 2339|       guint n_rects = 0;
# 2340|->     gdouble x1, y1, x2, y2;
# 2341|       gdouble x3, y3, x4, y4;
# 2342|       int n_lines;

Error: CPPCHECK_WARNING (CWE-457): [#def4]
poppler-24.08.0-build/poppler-24.08.0/glib/poppler-page.cc:2544: error[uninitvar]: Uninitialized variable: prev_word_i
# 2542|   
# 2543|               for (word_i = word_sel->getBegin(); word_i < end; word_i++) {
# 2544|->                 if (!prev_word || !word_text_attributes_equal(word, word_i, prev_word, prev_word_i)) {
# 2545|                       attrs = poppler_text_attributes_new_from_word(word, word_i);
# 2546|                       attrs->start_index = offset;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
poppler-24.08.0-build/poppler-24.08.0/glib/tests/pdfdrawbb.c: scope_hint: In function ‘pdfaddsuffix’
poppler-24.08.0-build/poppler-24.08.0/glib/tests/pdfdrawbb.c:28:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘outfile’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null
#   26|   
#   27|       outfile = malloc(strlen(infile) + strlen(suffix) + 10);
#   28|->     strcpy(outfile, basename);
#   29|       g_free(basename);
#   30|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
poppler-24.08.0-build/poppler-24.08.0/glib/tests/pdfdrawbb.c: scope_hint: In function ‘main’
poppler-24.08.0-build/poppler-24.08.0/glib/tests/pdfdrawbb.c:93:8: warning[-Wanalyzer-malloc-leak]: leak of ‘pdfaddsuffix(infilename, "bb")’
#   91|   
#   92|       infile = g_file_new_for_path(infilename);
#   93|->     if (infile == NULL) {
#   94|           exit(EXIT_FAILURE);
#   95|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
poppler-24.08.0-build/poppler-24.08.0/glib/tests/pdfdrawbb.c:98:8: warning[-Wanalyzer-malloc-leak]: leak of ‘pdfaddsuffix(infilename, "bb")’
#   96|   
#   97|       doc = poppler_document_new_from_gfile(infile, NULL, NULL, &err);
#   98|->     if (doc == NULL) {
#   99|           g_printerr("error opening pdf file: %s\n", err->message);
#  100|           g_error_free(err);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
poppler-24.08.0-build/poppler-24.08.0/glib/tests/pdfdrawbb.c:107:8: warning[-Wanalyzer-malloc-leak]: leak of ‘pdfaddsuffix(infilename, "bb")’
#  105|   
#  106|       npages = poppler_document_get_n_pages(doc);
#  107|->     if (npages < 1) {
#  108|           g_print("no page in document\n");
#  109|           exit(EXIT_FAILURE);

Error: CPPCHECK_WARNING (CWE-562): [#def9]
poppler-24.08.0-build/poppler-24.08.0/goo/gmem.h:192: error[returnDanglingLifetime]: Returning pointer to local variable 'r' that will be invalid when returning.
#  190|   {
#  191|       char *r = static_cast<char *>(gmalloc(std::strlen(s) + 1, false));
#  192|->     return std::strcpy(r, s);
#  193|   }
#  194|   

Error: CPPCHECK_WARNING (CWE-562): [#def10]
poppler-24.08.0-build/poppler-24.08.0/goo/gmem.h:200: error[returnDanglingLifetime]: Returning pointer to local variable 'r' that will be invalid when returning.
#  198|       char *r = static_cast<char *>(gmalloc(n + 1, false));
#  199|       r[n] = '\0';
#  200|->     return std::strncpy(r, s, n);
#  201|   }
#  202|   

Error: CPPCHECK_WARNING (CWE-562): [#def11]
poppler-24.08.0-build/poppler-24.08.0/poppler/CachedFile.cc:208: error[danglingLifetime]: Non-local variable 'chunks' will use pointer to local variable 'loadChunks'.
#  206|   {
#  207|       cachedFile = cachedFileA;
#  208|->     chunks = chunksA;
#  209|   
#  210|       if (chunks) {

Error: CPPCHECK_WARNING (CWE-562): [#def12]
poppler-24.08.0-build/poppler-24.08.0/poppler/CachedFile.cc:210: error[danglingLifetime]: Non-local variable 'chunks' will use pointer to local variable 'loadChunks'.
#  208|       chunks = chunksA;
#  209|   
#  210|->     if (chunks) {
#  211|           offset = 0;
#  212|           it = (*chunks).begin();

Error: CPPCHECK_WARNING (CWE-457): [#def13]
poppler-24.08.0-build/poppler-24.08.0/poppler/CachedFile.cc:266: warning[uninitvar]: Uninitialized variable: chunk
#  264|       }
#  265|   
#  266|->     if ((chunk == (cachedFile->length / CachedFileChunkSize)) && (offset == (cachedFile->length % CachedFileChunkSize))) {
#  267|           (*cachedFile->chunks)[chunk].state = CachedFile::chunkStateLoaded;
#  268|       }

Error: CPPCHECK_WARNING (CWE-457): [#def14]
poppler-24.08.0-build/poppler-24.08.0/poppler/CairoOutputDev.cc:3410: warning[uninitvar]: Uninitialized variable: pix
# 3408|           }
# 3409|   
# 3410|->         if (unlikely(pix == nullptr)) {
# 3411|               memset(row_data, 0, width * 4);
# 3412|               if (!imageError) {

Error: CPPCHECK_WARNING (CWE-457): [#def15]
poppler-24.08.0-build/poppler-24.08.0/poppler/Decrypt.cc:268: warning[uninitvar]: Uninitialized variable: tmpKey
#  266|                   tmpKey[j] = fileKey[j] ^ i;
#  267|               }
#  268|->             rc4InitKey(tmpKey, keyLength, fState);
#  269|               fx = fy = 0;
#  270|               for (j = 0; j < 32; ++j) {

Error: CPPCHECK_WARNING (CWE-457): [#def16]
poppler-24.08.0-build/poppler-24.08.0/poppler/Decrypt.cc:1774: error[uninitvar]: Uninitialized variable: totalLength
# 1772|       int rounds = 0;
# 1773|   
# 1774|->     while (rounds < 64 || rounds < E[totalLength - 1] + 32) {
# 1775|           sequenceLength = inputPasswordLength + KLength + userKeyLength;
# 1776|           totalLength = 64 * sequenceLength;

Error: CPPCHECK_WARNING (CWE-457): [#def17]
poppler-24.08.0-build/poppler-24.08.0/poppler/Function.cc:398: warning[uninitvar]: Uninitialized variable: in
#  396|           cacheIn[i] = in[i] - 1;
#  397|       }
#  398|->     transform(in, cacheOut);
#  399|   
#  400|       ok = true;

Error: CPPCHECK_WARNING (CWE-457): [#def18]
poppler-24.08.0-build/poppler-24.08.0/poppler/Gfx.cc:1495: warning[uninitvar]: Uninitialized variable: &color
# 1493|           color.c[i] = dblToCol(args[i].getNum());
# 1494|       }
# 1495|->     state->setFillColor(&color);
# 1496|       out->updateFillColor(state);
# 1497|   }

Error: CPPCHECK_WARNING (CWE-457): [#def19]
poppler-24.08.0-build/poppler-24.08.0/poppler/Gfx.cc:1512: warning[uninitvar]: Uninitialized variable: &color
# 1510|           color.c[i] = dblToCol(args[i].getNum());
# 1511|       }
# 1512|->     state->setStrokeColor(&color);
# 1513|       out->updateStrokeColor(state);
# 1514|   }

Error: CPPCHECK_WARNING (CWE-457): [#def20]
poppler-24.08.0-build/poppler-24.08.0/poppler/Gfx.cc:4497: warning[uninitvar]: Uninitialized variable: &matteColor
# 4495|                       }
# 4496|                       if (i == colorSpace->getNComps()) {
# 4497|->                         maskColorMap->setMatteColor(&matteColor);
# 4498|                       }
# 4499|                   }

Error: CPPCHECK_WARNING (CWE-457): [#def21]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:2700: warning[uninitvar]: Uninitialized variable: &color2
# 2698|               color2.c[i] = dblToCol(c[i]);
# 2699|           }
# 2700|->         alt->getGray(&color2, gray);
# 2701|       }
# 2702|   }

Error: CPPCHECK_WARNING (CWE-457): [#def22]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:2722: warning[uninitvar]: Uninitialized variable: &color2
# 2720|               color2.c[i] = dblToCol(c[i]);
# 2721|           }
# 2722|->         alt->getRGB(&color2, rgb);
# 2723|       }
# 2724|   }

Error: CPPCHECK_WARNING (CWE-457): [#def23]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:2999: warning[uninitvar]: Uninitialized variable: x
# 2997|           x[i] = colToDbl(color->c[i]);
# 2998|       }
# 2999|->     func->transform(x, c);
# 3000|       for (i = 0; i < alt->getNComps(); ++i) {
# 3001|           color2.c[i] = dblToCol(c[i]);

Error: CPPCHECK_WARNING (CWE-457): [#def24]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:3003: warning[uninitvar]: Uninitialized variable: &color2
# 3001|           color2.c[i] = dblToCol(c[i]);
# 3002|       }
# 3003|->     alt->getGray(&color2, gray);
# 3004|   }
# 3005|   

Error: CPPCHECK_WARNING (CWE-457): [#def25]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:3015: warning[uninitvar]: Uninitialized variable: x
# 3013|           x[i] = colToDbl(color->c[i]);
# 3014|       }
# 3015|->     func->transform(x, c);
# 3016|       for (i = 0; i < alt->getNComps(); ++i) {
# 3017|           color2.c[i] = dblToCol(c[i]);

Error: CPPCHECK_WARNING (CWE-457): [#def26]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:3019: warning[uninitvar]: Uninitialized variable: &color2
# 3017|           color2.c[i] = dblToCol(c[i]);
# 3018|       }
# 3019|->     alt->getRGB(&color2, rgb);
# 3020|   }
# 3021|   

Error: CPPCHECK_WARNING (CWE-457): [#def27]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:3031: warning[uninitvar]: Uninitialized variable: x
# 3029|           x[i] = colToDbl(color->c[i]);
# 3030|       }
# 3031|->     func->transform(x, c);
# 3032|       for (i = 0; i < alt->getNComps(); ++i) {
# 3033|           color2.c[i] = dblToCol(c[i]);

Error: CPPCHECK_WARNING (CWE-457): [#def28]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:3035: warning[uninitvar]: Uninitialized variable: &color2
# 3033|           color2.c[i] = dblToCol(c[i]);
# 3034|       }
# 3035|->     alt->getCMYK(&color2, cmyk);
# 3036|   }
# 3037|   

Error: CPPCHECK_WARNING (CWE-457): [#def29]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:5816: warning[uninitvar]: Uninitialized variable: &color
# 5814|               color.c[i] = lookup2[i][x[0]];
# 5815|           }
# 5816|->         colorSpace2->getGray(&color, gray);
# 5817|       } else {
# 5818|           for (i = 0; i < nComps; ++i) {

Error: CPPCHECK_WARNING (CWE-457): [#def30]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:5834: warning[uninitvar]: Uninitialized variable: &color
# 5832|               color.c[i] = lookup2[i][x[0]];
# 5833|           }
# 5834|->         colorSpace2->getRGB(&color, rgb);
# 5835|       } else {
# 5836|           for (i = 0; i < nComps; ++i) {

Error: CPPCHECK_WARNING (CWE-457): [#def31]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:6155: warning[uninitvar]: Uninitialized variable: &color
# 6153|               color.c[i] = lookup2[i][x[0]];
# 6154|           }
# 6155|->         colorSpace2->getCMYK(&color, cmyk);
# 6156|       } else {
# 6157|           for (i = 0; i < nComps; ++i) {

Error: CPPCHECK_WARNING (CWE-457): [#def32]
poppler-24.08.0-build/poppler-24.08.0/poppler/GfxState.cc:6173: warning[uninitvar]: Uninitialized variable: &color
# 6171|               color.c[i] = lookup2[i][x[0]];
# 6172|           }
# 6173|->         colorSpace2->getDeviceN(&color, deviceN);
# 6174|       } else {
# 6175|           for (i = 0; i < nComps; ++i) {

Error: CPPCHECK_WARNING (CWE-457): [#def33]
poppler-24.08.0-build/poppler-24.08.0/poppler/Outline.cc:190: warning[uninitvar]: Uninitialized variables: nextRef.num, nextRef.gen
#  188|           xref->removeIndirectObject(ref);
#  189|           count++;
#  190|->         ref = nextRef;
#  191|       }
#  192|       return count;

Error: CPPCHECK_WARNING (CWE-457): [#def34]
poppler-24.08.0-build/poppler-24.08.0/poppler/PSOutputDev.cc:1048: warning[uninitvar]: Uninitialized variable: x
# 1046|           x[i] = colToDbl(color.c[i]);
# 1047|       }
# 1048|->     func->transform(x, y);
# 1049|       for (i = 0; i < bufSize; ++i) {
# 1050|           buf[i] = (int)(y[i] * 255 + 0.5);

Error: CPPCHECK_WARNING (CWE-457): [#def35]
poppler-24.08.0-build/poppler-24.08.0/poppler/UTF.cc:204: warning[uninitvar]: Uninitialized variable: *codep
#  202|       uint32_t type = decodeUtf8Table[b];
#  203|   
#  204|->     *codep = (*state != UTF8_ACCEPT) ? (b & 0x3fu) | (*codep << 6) : (0xff >> type) & (b);
#  205|   
#  206|       *state = decodeUtf8Table[256 + *state + type];

Error: CPPCHECK_WARNING (CWE-562): [#def36]
poppler-24.08.0-build/poppler-24.08.0/poppler/UnicodeMap.cc:299: error[returnDanglingLifetime]: Returning pointer to local variable 'map' that will be invalid when returning.
#  297|           UnicodeMap *m = map.get();
#  298|           cache.emplace_back(std::move(map));
#  299|->         return m;
#  300|       }
#  301|       return nullptr;

Error: COMPILER_WARNING (CWE-477): [#def37]
poppler-24.08.0-build/poppler-24.08.0/qt5/src/poppler-annotation.cc: scope_hint: In constructor ‘Poppler::Annotation::Annotation(Poppler::AnnotationPrivate&, const QDomNode&)’
poppler-24.08.0-build/poppler-24.08.0/qt5/src/poppler-annotation.cc:1138:54: warning[-Wdeprecated-declarations]: ‘static QDomElement Poppler::AnnotationUtils::findChildElement(const QDomNode&, const QString&)’ is deprecated
# 1138 |     QDomElement e = AnnotationUtils::findChildElement(annNode, QStringLiteral("base"));
#      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
poppler-24.08.0-build/poppler-24.08.0/qt5/src/poppler-annotation.cc:119:13: note: declared here
#  119 | QDomElement AnnotationUtils::findChildElement(const QDomNode &parentNode, const QString &name)
#      |             ^~~~~~~~~~~~~~~
# 1136|   
# 1137|       // get the [base] element of the annotation node
# 1138|->     QDomElement e = AnnotationUtils::findChildElement(annNode, QStringLiteral("base"));
# 1139|       if (e.isNull()) {
# 1140|           return;

Error: COMPILER_WARNING (CWE-477): [#def38]
poppler-24.08.0-build/poppler-24.08.0/qt5/src/poppler-annotation.cc:1278:62: warning[-Wdeprecated-declarations]: ‘static Poppler::Annotation* Poppler::AnnotationUtils::createAnnotation(const QDomElement&)’ is deprecated
# 1278 |         Annotation *reply = AnnotationUtils::createAnnotation(revElement);
#      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
poppler-24.08.0-build/poppler-24.08.0/qt5/src/poppler-annotation.cc:72:13: note: declared here
#   72 | Annotation *AnnotationUtils::createAnnotation(const QDomElement &annElement)
#      |             ^~~~~~~~~~~~~~~
# 1276|           }
# 1277|   
# 1278|->         Annotation *reply = AnnotationUtils::createAnnotation(revElement);
# 1279|   
# 1280|           if (reply) // if annotation is valid, add as a revision of this annotation

Error: COMPILER_WARNING (CWE-477): [#def39]
poppler-24.08.0-build/poppler-24.08.0/qt5/src/poppler-annotation.cc: scope_hint: In member function ‘void Poppler::Annotation::storeBaseAnnotationProperties(QDomNode&, QDomDocument&) const’
poppler-24.08.0-build/poppler-24.08.0/qt5/src/poppler-annotation.cc:1410:41: warning[-Wdeprecated-declarations]: ‘static void Poppler::AnnotationUtils::storeAnnotation(const Poppler::Annotation*, QDomElement&, QDomDocument&)’ is deprecated
# 1410 |         AnnotationUtils::storeAnnotation(rev, r, document);
#      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
poppler-24.08.0-build/poppler-24.08.0/qt5/src/poppler-annotation.cc:110:6: note: declared here
#  110 | void AnnotationUtils::storeAnnotation(const Annotation *ann, QDomElement &annElement, QDomDocument &document)
#      |      ^~~~~~~~~~~~~~~
# 1408|           r.setAttribute(QStringLiteral("revType"), (int)rev->revisionType());
# 1409|           // use revision as the annotation element, so fill it up
# 1410|->         AnnotationUtils::storeAnnotation(rev, r, document);
# 1411|           delete rev;
# 1412|       }

Error: COMPILER_WARNING (CWE-477): [#def40]
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-document.cc: scope_hint: In function ‘QDateTime Poppler::convertDate(const char*)’
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-document.cc:896:39: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#  896 |             QDateTime dt(d, t, Qt::UTC);
#      |                                       ^
/usr/include/qt6/QtCore/QDateTime:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-annotation.h:36: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-qt6.h:57: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-document.cc:40: included_from: Included from here.
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#  894|           QTime t(hour, min, sec);
#  895|           if (d.isValid() && t.isValid()) {
#  896|->             QDateTime dt(d, t, Qt::UTC);
#  897|               if (tz) {
#  898|                   // then we have some form of timezone

Error: COMPILER_WARNING (CWE-477): [#def41]
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-form.cc: scope_hint: In function ‘Poppler::CertificateInfoPrivate* Poppler::createCertificateInfoPrivate(const X509CertificateInfo*)’
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-form.cc:1034:65: warning[-Wdeprecated-declarations]: ‘static QDateTime QDateTime::fromSecsSinceEpoch(qint64, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead of time-spec, offset
# 1034 |         certPriv->validity_start = QDateTime::fromSecsSinceEpoch(certValidity.notBefore, Qt::UTC);
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/QDateTime:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-form.h:41: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-form.cc:37: included_from: Included from here.
/usr/include/qt6/QtCore/qdatetime.h:488:22: note: declared here
#  488 |     static QDateTime fromSecsSinceEpoch(qint64 secs, Qt::TimeSpec spec, int offsetFromUtc = 0);
#      |                      ^~~~~~~~~~~~~~~~~~
# 1032|   
# 1033|           X509CertificateInfo::Validity certValidity = ci->getValidity();
# 1034|->         certPriv->validity_start = QDateTime::fromSecsSinceEpoch(certValidity.notBefore, Qt::UTC);
# 1035|           certPriv->validity_end = QDateTime::fromSecsSinceEpoch(certValidity.notAfter, Qt::UTC);
# 1036|   

Error: COMPILER_WARNING (CWE-477): [#def42]
poppler-24.08.0-build/poppler-24.08.0/qt6/src/poppler-form.cc:1035:63: warning[-Wdeprecated-declarations]: ‘static QDateTime QDateTime::fromSecsSinceEpoch(qint64, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead of time-spec, offset
# 1035 |         certPriv->validity_end = QDateTime::fromSecsSinceEpoch(certValidity.notAfter, Qt::UTC);
#      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qdatetime.h:488:22: note: declared here
#  488 |     static QDateTime fromSecsSinceEpoch(qint64 secs, Qt::TimeSpec spec, int offsetFromUtc = 0);
#      |                      ^~~~~~~~~~~~~~~~~~
# 1033|           X509CertificateInfo::Validity certValidity = ci->getValidity();
# 1034|           certPriv->validity_start = QDateTime::fromSecsSinceEpoch(certValidity.notBefore, Qt::UTC);
# 1035|->         certPriv->validity_end = QDateTime::fromSecsSinceEpoch(certValidity.notAfter, Qt::UTC);
# 1036|   
# 1037|           const X509CertificateInfo::PublicKeyInfo &pkInfo = ci->getPublicKeyInfo();

Error: COMPILER_WARNING (CWE-477): [#def43]
/usr/include/qt6/QtTest/qtest.h:13: included_from: Included from here.
/usr/include/qt6/QtTest/QTest:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp: scope_hint: In member function ‘void TestAttachments::checkAttach2()’
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:79:93: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#   79 |     QCOMPARE(embfile1->createDate(), QDateTime(QDate(2003, 8, 4), QTime(13, 54, 54), Qt::UTC));
#      |                                                                                             ^
/usr/include/qt6/QtCore/qcborvalue.h:10: included_from: Included from here.
/usr/include/qt6/QtCore/qcborarray.h:7: included_from: Included from here.
/usr/include/qt6/QtTest/qtesttostring.h:17: included_from: Included from here.
/usr/include/qt6/QtTest/qtestcase.h:8: included_from: Included from here.
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#   77|       QCOMPARE(embfile1->name(), QLatin1String("Acro7 thoughts"));
#   78|       QCOMPARE(embfile1->description(), QString());
#   79|->     QCOMPARE(embfile1->createDate(), QDateTime(QDate(2003, 8, 4), QTime(13, 54, 54), Qt::UTC));
#   80|       QCOMPARE(embfile1->modDate(), QDateTime(QDate(2003, 8, 4), QTime(14, 15, 27), Qt::UTC));
#   81|       QCOMPARE(embfile1->mimeType(), QLatin1String("text/xml"));

Error: COMPILER_WARNING (CWE-477): [#def44]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:80:90: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#   80 |     QCOMPARE(embfile1->modDate(), QDateTime(QDate(2003, 8, 4), QTime(14, 15, 27), Qt::UTC));
#      |                                                                                          ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#   78|       QCOMPARE(embfile1->description(), QString());
#   79|       QCOMPARE(embfile1->createDate(), QDateTime(QDate(2003, 8, 4), QTime(13, 54, 54), Qt::UTC));
#   80|->     QCOMPARE(embfile1->modDate(), QDateTime(QDate(2003, 8, 4), QTime(14, 15, 27), Qt::UTC));
#   81|       QCOMPARE(embfile1->mimeType(), QLatin1String("text/xml"));
#   82|   

Error: COMPILER_WARNING (CWE-477): [#def45]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:86:93: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#   86 |     QCOMPARE(embfile2->createDate(), QDateTime(QDate(2003, 7, 18), QTime(21, 7, 16), Qt::UTC));
#      |                                                                                             ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#   84|       QCOMPARE(embfile2->name(), QLatin1String("acro transitions 1.xls"));
#   85|       QCOMPARE(embfile2->description(), QString());
#   86|->     QCOMPARE(embfile2->createDate(), QDateTime(QDate(2003, 7, 18), QTime(21, 7, 16), Qt::UTC));
#   87|       QCOMPARE(embfile2->modDate(), QDateTime(QDate(2003, 7, 22), QTime(13, 4, 40), Qt::UTC));
#   88|       QCOMPARE(embfile2->mimeType(), QLatin1String("application/excel"));

Error: COMPILER_WARNING (CWE-477): [#def46]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:87:90: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#   87 |     QCOMPARE(embfile2->modDate(), QDateTime(QDate(2003, 7, 22), QTime(13, 4, 40), Qt::UTC));
#      |                                                                                          ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#   85|       QCOMPARE(embfile2->description(), QString());
#   86|       QCOMPARE(embfile2->createDate(), QDateTime(QDate(2003, 7, 18), QTime(21, 7, 16), Qt::UTC));
#   87|->     QCOMPARE(embfile2->modDate(), QDateTime(QDate(2003, 7, 22), QTime(13, 4, 40), Qt::UTC));
#   88|       QCOMPARE(embfile2->mimeType(), QLatin1String("application/excel"));
#   89|   

Error: COMPILER_WARNING (CWE-477): [#def47]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:93:94: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#   93 |     QCOMPARE(embfile3->createDate(), QDateTime(QDate(2003, 1, 31), QTime(15, 54, 29), Qt::UTC));
#      |                                                                                              ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#   91|       QCOMPARE(embfile3->name(), QLatin1String("apago_pdfe_wide.gif"));
#   92|       QCOMPARE(embfile3->description(), QString());
#   93|->     QCOMPARE(embfile3->createDate(), QDateTime(QDate(2003, 1, 31), QTime(15, 54, 29), Qt::UTC));
#   94|       QCOMPARE(embfile3->modDate(), QDateTime(QDate(2003, 1, 31), QTime(15, 52, 58), Qt::UTC));
#   95|       QCOMPARE(embfile3->mimeType(), QString());

Error: COMPILER_WARNING (CWE-477): [#def48]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:94:91: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#   94 |     QCOMPARE(embfile3->modDate(), QDateTime(QDate(2003, 1, 31), QTime(15, 52, 58), Qt::UTC));
#      |                                                                                           ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#   92|       QCOMPARE(embfile3->description(), QString());
#   93|       QCOMPARE(embfile3->createDate(), QDateTime(QDate(2003, 1, 31), QTime(15, 54, 29), Qt::UTC));
#   94|->     QCOMPARE(embfile3->modDate(), QDateTime(QDate(2003, 1, 31), QTime(15, 52, 58), Qt::UTC));
#   95|       QCOMPARE(embfile3->mimeType(), QString());
#   96|   }

Error: COMPILER_WARNING (CWE-477): [#def49]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp: scope_hint: In member function ‘void TestAttachments::checkAttach3()’
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:112:93: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#  112 |     QCOMPARE(embfile->createDate(), QDateTime(QDate(2004, 3, 29), QTime(19, 37, 16), Qt::UTC));
#      |                                                                                             ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#  110|       QCOMPARE(embfile->name(), QLatin1String("ADEX1.xpdf.pgp"));
#  111|       QCOMPARE(embfile->description(), QString());
#  112|->     QCOMPARE(embfile->createDate(), QDateTime(QDate(2004, 3, 29), QTime(19, 37, 16), Qt::UTC));
#  113|       QCOMPARE(embfile->modDate(), QDateTime(QDate(2004, 3, 29), QTime(19, 37, 16), Qt::UTC));
#  114|       QCOMPARE(embfile->mimeType(), QString());

Error: COMPILER_WARNING (CWE-477): [#def50]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:113:90: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#  113 |     QCOMPARE(embfile->modDate(), QDateTime(QDate(2004, 3, 29), QTime(19, 37, 16), Qt::UTC));
#      |                                                                                          ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#  111|       QCOMPARE(embfile->description(), QString());
#  112|       QCOMPARE(embfile->createDate(), QDateTime(QDate(2004, 3, 29), QTime(19, 37, 16), Qt::UTC));
#  113|->     QCOMPARE(embfile->modDate(), QDateTime(QDate(2004, 3, 29), QTime(19, 37, 16), Qt::UTC));
#  114|       QCOMPARE(embfile->mimeType(), QString());
#  115|   }

Error: COMPILER_WARNING (CWE-477): [#def51]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp: scope_hint: In member function ‘void TestAttachments::checkAttach4()’
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:131:93: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#  131 |     QCOMPARE(embfile->createDate(), QDateTime(QDate(2005, 8, 30), QTime(20, 49, 35), Qt::UTC));
#      |                                                                                             ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#  129|       QCOMPARE(embfile->name(), QLatin1String("export-altona.csv"));
#  130|       QCOMPARE(embfile->description(), QLatin1String("Altona Export"));
#  131|->     QCOMPARE(embfile->createDate(), QDateTime(QDate(2005, 8, 30), QTime(20, 49, 35), Qt::UTC));
#  132|       QCOMPARE(embfile->modDate(), QDateTime(QDate(2005, 8, 30), QTime(20, 49, 52), Qt::UTC));
#  133|       QCOMPARE(embfile->mimeType(), QLatin1String("application/vnd.ms-excel"));

Error: COMPILER_WARNING (CWE-477): [#def52]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_attachments.cpp:132:90: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#  132 |     QCOMPARE(embfile->modDate(), QDateTime(QDate(2005, 8, 30), QTime(20, 49, 52), Qt::UTC));
#      |                                                                                          ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#  130|       QCOMPARE(embfile->description(), QLatin1String("Altona Export"));
#  131|       QCOMPARE(embfile->createDate(), QDateTime(QDate(2005, 8, 30), QTime(20, 49, 35), Qt::UTC));
#  132|->     QCOMPARE(embfile->modDate(), QDateTime(QDate(2005, 8, 30), QTime(20, 49, 52), Qt::UTC));
#  133|       QCOMPARE(embfile->mimeType(), QLatin1String("application/vnd.ms-excel"));
#  134|   }

Error: COMPILER_WARNING (CWE-477): [#def53]
/usr/include/qt6/QtTest/qtest.h:13: included_from: Included from here.
/usr/include/qt6/QtTest/QTest:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_dateConversion.cpp:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_dateConversion.cpp: scope_hint: In member function ‘void TestDateConv::checkDates()’
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_dateConversion.cpp:72:83: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#   72 |     QCOMPARE(Poppler::convertDate(input.constData()), QDateTime(day, time, Qt::UTC));
#      |                                                                                   ^
/usr/include/qt6/QtCore/qcborvalue.h:10: included_from: Included from here.
/usr/include/qt6/QtCore/qcborarray.h:7: included_from: Included from here.
/usr/include/qt6/QtTest/qtesttostring.h:17: included_from: Included from here.
/usr/include/qt6/QtTest/qtestcase.h:8: included_from: Included from here.
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#   70|       QFETCH(QTime, time);
#   71|   
#   72|->     QCOMPARE(Poppler::convertDate(input.constData()), QDateTime(day, time, Qt::UTC));
#   73|   }
#   74|   

Error: COMPILER_WARNING (CWE-477): [#def54]
/usr/include/qt6/QtTest/qtest.h:13: included_from: Included from here.
/usr/include/qt6/QtTest/QTest:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_metadata.cpp:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_metadata.cpp: scope_hint: In member function ‘void TestMetaData::checkDate()’
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_metadata.cpp:139:107: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#  139 |     QCOMPARE(doc->date(QStringLiteral("ModDate")), QDateTime(QDate(2005, 12, 5), QTime(9, 44, 46), Qt::UTC));
#      |                                                                                                           ^
/usr/include/qt6/QtCore/qcborvalue.h:10: included_from: Included from here.
/usr/include/qt6/QtCore/qcborarray.h:7: included_from: Included from here.
/usr/include/qt6/QtTest/qtesttostring.h:17: included_from: Included from here.
/usr/include/qt6/QtTest/qtestcase.h:8: included_from: Included from here.
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#  137|       std::unique_ptr<Poppler::Document> doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
#  138|       QVERIFY(doc);
#  139|->     QCOMPARE(doc->date(QStringLiteral("ModDate")), QDateTime(QDate(2005, 12, 5), QTime(9, 44, 46), Qt::UTC));
#  140|       QCOMPARE(doc->date(QStringLiteral("CreationDate")), QDateTime(QDate(2005, 8, 13), QTime(1, 12, 11), Qt::UTC));
#  141|   }

Error: COMPILER_WARNING (CWE-477): [#def55]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/check_metadata.cpp:140:112: warning[-Wdeprecated-declarations]: ‘QDateTime::QDateTime(QDate, QTime, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead
#  140 |     QCOMPARE(doc->date(QStringLiteral("CreationDate")), QDateTime(QDate(2005, 8, 13), QTime(1, 12, 11), Qt::UTC));
#      |                                                                                                                ^
/usr/include/qt6/QtCore/qdatetime.h:359:5: note: declared here
#  359 |     QDateTime(QDate date, QTime time, Qt::TimeSpec spec, int offsetSeconds = 0);
#      |     ^~~~~~~~~
#  138|       QVERIFY(doc);
#  139|       QCOMPARE(doc->date(QStringLiteral("ModDate")), QDateTime(QDate(2005, 12, 5), QTime(9, 44, 46), Qt::UTC));
#  140|->     QCOMPARE(doc->date(QStringLiteral("CreationDate")), QDateTime(QDate(2005, 8, 13), QTime(1, 12, 11), Qt::UTC));
#  141|   }
#  142|   

Error: COMPILER_WARNING (CWE-477): [#def56]
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/poppler-forms.cpp: scope_hint: In function ‘int main(int, char**)’
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/poppler-forms.cpp:267:76: warning[-Wdeprecated-declarations]: ‘static QDateTime QDateTime::fromSecsSinceEpoch(qint64, Qt::TimeSpec, int)’ is deprecated: Pass QTimeZone instead of time-spec, offset
#  267 |                     const QDateTime sviTime = QDateTime::fromSecsSinceEpoch(svi.signingTime(), Qt::UTC);
#      |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/QDateTime:1: included_from: Included from here.
poppler-24.08.0-build/poppler-24.08.0/qt6/tests/poppler-forms.cpp:2: included_from: Included from here.
/usr/include/qt6/QtCore/qdatetime.h:488:22: note: declared here
#  488 |     static QDateTime fromSecsSinceEpoch(qint64 secs, Qt::TimeSpec spec, int offsetFromUtc = 0);
#      |                      ^~~~~~~~~~~~~~~~~~
#  265|                                     << "(null)" << std::endl;
#  266|                       }
#  267|->                     const QDateTime sviTime = QDateTime::fromSecsSinceEpoch(svi.signingTime(), Qt::UTC);
#  268|                       std::cout << "\t\t\tSigningTime: " << sviTime.toString() << std::endl;
#  269|                   } break;

Error: COMPILER_WARNING (CWE-457): [#def57]
poppler-24.08.0-build/poppler-24.08.0/splash/SplashBitmap.cc: scope_hint: In member function ‘SplashBitmap::SplashBitmap(int, int, int, SplashColorMode, bool, bool, std::vector<GfxSeparationColorSpace*, std::allocator<GfxSeparationColorSpace*> > const*)’
poppler-24.08.0-build/poppler-24.08.0/splash/SplashBitmap.cc:107:9: warning[-Wmaybe-uninitialized]: ‘*this_41(D).rowSize’ may be used uninitialized
#  107 |     if (rowSize > 0) {
#      |         ^~~~~~~
#  105|           break;
#  106|       }
#  107|->     if (rowSize > 0) {
#  108|           rowSize += rowPad - 1;
#  109|           rowSize -= rowSize % rowPad;

Error: CPPCHECK_WARNING (CWE-415): [#def58]
poppler-24.08.0-build/poppler-24.08.0/utils/pdftotext.cc:350: error[doubleFree]: Resource handle 'f' freed twice.
#  348|           }
#  349|           if (f != stdout) {
#  350|->             fclose(f);
#  351|           }
#  352|       } else {

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-55.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namepoppler-24.08.0-1.fc42
store-results-to/tmp/tmpradg12kk/poppler-24.08.0-1.fc42.tar.xz
time-created2024-11-13 02:36:52
time-finished2024-11-13 02:44:04
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpradg12kk/poppler-24.08.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpradg12kk/poppler-24.08.0-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9