Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/okular-20.08.3/shell/okular_main.cpp
Examining data/okular-20.08.3/shell/okular_main.h
Examining data/okular-20.08.3/shell/shell.cpp
Examining data/okular-20.08.3/shell/shellutils.cpp
Examining data/okular-20.08.3/shell/main.cpp
Examining data/okular-20.08.3/shell/shellutils.h
Examining data/okular-20.08.3/shell/shell.h
Examining data/okular-20.08.3/part.cpp
Examining data/okular-20.08.3/extensions.cpp
Examining data/okular-20.08.3/ui/bookmarklist.h
Examining data/okular-20.08.3/ui/layers.cpp
Examining data/okular-20.08.3/ui/sidebar.cpp
Examining data/okular-20.08.3/ui/certificateviewer.h
Examining data/okular-20.08.3/ui/pageviewannotator.h
Examining data/okular-20.08.3/ui/annotationpopup.h
Examining data/okular-20.08.3/ui/signaturepanel.h
Examining data/okular-20.08.3/ui/debug_ui.h
Examining data/okular-20.08.3/ui/magnifierview.cpp
Examining data/okular-20.08.3/ui/signaturemodel.cpp
Examining data/okular-20.08.3/ui/pageview.h
Examining data/okular-20.08.3/ui/revisionviewer.h
Examining data/okular-20.08.3/ui/pageviewutils.cpp
Examining data/okular-20.08.3/ui/debug_ui.cpp
Examining data/okular-20.08.3/ui/searchlineedit.h
Examining data/okular-20.08.3/ui/annotationwidgets.h
Examining data/okular-20.08.3/ui/signaturepropertiesdialog.h
Examining data/okular-20.08.3/ui/searchwidget.h
Examining data/okular-20.08.3/ui/annotationmodel.cpp
Examining data/okular-20.08.3/ui/annotationtools.cpp
Examining data/okular-20.08.3/ui/pageitemdelegate.cpp
Examining data/okular-20.08.3/ui/guiutils.cpp
Examining data/okular-20.08.3/ui/fileprinterpreview.cpp
Examining data/okular-20.08.3/ui/pageviewmouseannotation.h
Examining data/okular-20.08.3/ui/latexrenderer.cpp
Examining data/okular-20.08.3/ui/presentationwidget.cpp
Examining data/okular-20.08.3/ui/snapshottaker.cpp
Examining data/okular-20.08.3/ui/signaturepanel.cpp
Examining data/okular-20.08.3/ui/toggleactionmenu.cpp
Examining data/okular-20.08.3/ui/minibar.cpp
Examining data/okular-20.08.3/ui/thumbnaillist.cpp
Examining data/okular-20.08.3/ui/signaturemodel.h
Examining data/okular-20.08.3/ui/presentationsearchbar.h
Examining data/okular-20.08.3/ui/signatureguiutils.h
Examining data/okular-20.08.3/ui/pageviewannotator.cpp
Examining data/okular-20.08.3/ui/tocmodel.h
Examining data/okular-20.08.3/ui/pagepainter.h
Examining data/okular-20.08.3/ui/ktreeviewsearchline.cpp
Examining data/okular-20.08.3/ui/thumbnaillist.h
Examining data/okular-20.08.3/ui/fileprinterpreview.h
Examining data/okular-20.08.3/ui/embeddedfilesdialog.h
Examining data/okular-20.08.3/ui/guiutils.h
Examining data/okular-20.08.3/ui/priorities.h
Examining data/okular-20.08.3/ui/annotationpropertiesdialog.cpp
Examining data/okular-20.08.3/ui/propertiesdialog.cpp
Examining data/okular-20.08.3/ui/signaturepropertiesdialog.cpp
Examining data/okular-20.08.3/ui/searchlineedit.cpp
Examining data/okular-20.08.3/ui/annotationactionhandler.cpp
Examining data/okular-20.08.3/ui/findbar.h
Examining data/okular-20.08.3/ui/tts.cpp
Examining data/okular-20.08.3/ui/snapshottaker.h
Examining data/okular-20.08.3/ui/pageview.cpp
Examining data/okular-20.08.3/ui/presentationwidget.h
Examining data/okular-20.08.3/ui/latexrenderer.h
Examining data/okular-20.08.3/ui/formwidgets.cpp
Examining data/okular-20.08.3/ui/findbar.cpp
Examining data/okular-20.08.3/ui/embeddedfilesdialog.cpp
Examining data/okular-20.08.3/ui/toggleactionmenu.h
Examining data/okular-20.08.3/ui/revisionviewer.cpp
Examining data/okular-20.08.3/ui/searchwidget.cpp
Examining data/okular-20.08.3/ui/okmenutitle.h
Examining data/okular-20.08.3/ui/drawingtoolactions.cpp
Examining data/okular-20.08.3/ui/bookmarklist.cpp
Examining data/okular-20.08.3/ui/tts.h
Examining data/okular-20.08.3/ui/certificateviewer.cpp
Examining data/okular-20.08.3/ui/pagesizelabel.h
Examining data/okular-20.08.3/ui/pagesizelabel.cpp
Examining data/okular-20.08.3/ui/layers.h
Examining data/okular-20.08.3/ui/pageviewmouseannotation.cpp
Examining data/okular-20.08.3/ui/sidebar.h
Examining data/okular-20.08.3/ui/url_utils.h
Examining data/okular-20.08.3/ui/okmenutitle.cpp
Examining data/okular-20.08.3/ui/presentationsearchbar.cpp
Examining data/okular-20.08.3/ui/ktreeviewsearchline.h
Examining data/okular-20.08.3/ui/pageviewutils.h
Examining data/okular-20.08.3/ui/annotationproxymodels.cpp
Examining data/okular-20.08.3/ui/annotwindow.cpp
Examining data/okular-20.08.3/ui/formwidgets.h
Examining data/okular-20.08.3/ui/annotationproxymodels.h
Examining data/okular-20.08.3/ui/minibar.h
Examining data/okular-20.08.3/ui/pageitemdelegate.h
Examining data/okular-20.08.3/ui/drawingtoolactions.h
Examining data/okular-20.08.3/ui/annotationactionhandler.h
Examining data/okular-20.08.3/ui/magnifierview.h
Examining data/okular-20.08.3/ui/annotationtools.h
Examining data/okular-20.08.3/ui/annotationwidgets.cpp
Examining data/okular-20.08.3/ui/annotwindow.h
Examining data/okular-20.08.3/ui/toc.cpp
Examining data/okular-20.08.3/ui/videowidget.h
Examining data/okular-20.08.3/ui/propertiesdialog.h
Examining data/okular-20.08.3/ui/annotationmodel.h
Examining data/okular-20.08.3/ui/toc.h
Examining data/okular-20.08.3/ui/videowidget.cpp
Examining data/okular-20.08.3/ui/side_reviews.cpp
Examining data/okular-20.08.3/ui/pagepainter.cpp
Examining data/okular-20.08.3/ui/side_reviews.h
Examining data/okular-20.08.3/ui/annotationpropertiesdialog.h
Examining data/okular-20.08.3/ui/signatureguiutils.cpp
Examining data/okular-20.08.3/ui/tocmodel.cpp
Examining data/okular-20.08.3/ui/annotationpopup.cpp
Examining data/okular-20.08.3/autotests/urldetecttest.cpp
Examining data/okular-20.08.3/autotests/editannotationcontentstest.cpp
Examining data/okular-20.08.3/autotests/translateannotationtest.cpp
Examining data/okular-20.08.3/autotests/shelltest.cpp
Examining data/okular-20.08.3/autotests/closedialoghelper.h
Examining data/okular-20.08.3/autotests/kjsfunctionstest.cpp
Examining data/okular-20.08.3/autotests/modifyannotationpropertiestest.cpp
Examining data/okular-20.08.3/autotests/parttest.cpp
Examining data/okular-20.08.3/autotests/editformstest.cpp
Examining data/okular-20.08.3/autotests/addremoveannotationtest.cpp
Examining data/okular-20.08.3/autotests/annotationstest.cpp
Examining data/okular-20.08.3/autotests/visibilitytest.cpp
Examining data/okular-20.08.3/autotests/signatureformtest.cpp
Examining data/okular-20.08.3/autotests/testingutils.h
Examining data/okular-20.08.3/autotests/generatorstest.cpp
Examining data/okular-20.08.3/autotests/testingutils.cpp
Examining data/okular-20.08.3/autotests/searchtest.cpp
Examining data/okular-20.08.3/autotests/closedialoghelper.cpp
Examining data/okular-20.08.3/autotests/documenttest.cpp
Examining data/okular-20.08.3/autotests/mainshelltest.cpp
Examining data/okular-20.08.3/autotests/calculatetexttest.cpp
Examining data/okular-20.08.3/autotests/formattest.cpp
Examining data/okular-20.08.3/autotests/annotationtoolbartest.cpp
Examining data/okular-20.08.3/extensions.h
Examining data/okular-20.08.3/conf/editdrawingtooldialog.cpp
Examining data/okular-20.08.3/conf/widgetannottools.cpp
Examining data/okular-20.08.3/conf/dlgdebug.h
Examining data/okular-20.08.3/conf/widgetconfigurationtoolsbase.h
Examining data/okular-20.08.3/conf/dlgpresentation.h
Examining data/okular-20.08.3/conf/editannottooldialog.h
Examining data/okular-20.08.3/conf/autotests/editdrawingtooldialogtest.h
Examining data/okular-20.08.3/conf/autotests/editdrawingtooldialogtest.cpp
Examining data/okular-20.08.3/conf/preferencesdialog.h
Examining data/okular-20.08.3/conf/widgetdrawingtools.cpp
Examining data/okular-20.08.3/conf/preferencesdialog.cpp
Examining data/okular-20.08.3/conf/dlgaccessibility.h
Examining data/okular-20.08.3/conf/dlgpresentation.cpp
Examining data/okular-20.08.3/conf/dlgeditor.h
Examining data/okular-20.08.3/conf/dlgdebug.cpp
Examining data/okular-20.08.3/conf/dlgperformance.cpp
Examining data/okular-20.08.3/conf/dlggeneral.h
Examining data/okular-20.08.3/conf/dlgeditor.cpp
Examining data/okular-20.08.3/conf/widgetannottools.h
Examining data/okular-20.08.3/conf/dlgaccessibility.cpp
Examining data/okular-20.08.3/conf/dlggeneral.cpp
Examining data/okular-20.08.3/conf/editdrawingtooldialog.h
Examining data/okular-20.08.3/conf/widgetdrawingtools.h
Examining data/okular-20.08.3/conf/widgetconfigurationtoolsbase.cpp
Examining data/okular-20.08.3/conf/dlgannotations.cpp
Examining data/okular-20.08.3/conf/editannottooldialog.cpp
Examining data/okular-20.08.3/conf/dlgannotations.h
Examining data/okular-20.08.3/conf/dlgperformance.h
Examining data/okular-20.08.3/aboutdata.h
Examining data/okular-20.08.3/mobile/components/documentitem.h
Examining data/okular-20.08.3/mobile/components/pageitem.h
Examining data/okular-20.08.3/mobile/components/settings.h
Examining data/okular-20.08.3/mobile/components/okularplugin.cpp
Examining data/okular-20.08.3/mobile/components/okularsingleton.cpp
Examining data/okular-20.08.3/mobile/components/thumbnailitem.cpp
Examining data/okular-20.08.3/mobile/components/documentitem.cpp
Examining data/okular-20.08.3/mobile/components/okularsingleton.h
Examining data/okular-20.08.3/mobile/components/okularplugin.h
Examining data/okular-20.08.3/mobile/components/thumbnailitem.h
Examining data/okular-20.08.3/mobile/components/pageitem.cpp
Examining data/okular-20.08.3/mobile/app/android.h
Examining data/okular-20.08.3/mobile/app/android.cpp
Examining data/okular-20.08.3/mobile/app/main.cpp
Examining data/okular-20.08.3/kdocumentviewer.h
Examining data/okular-20.08.3/xmlgui_helper.h
Examining data/okular-20.08.3/core/rotationjob_p.h
Examining data/okular-20.08.3/core/textpage.cpp
Examining data/okular-20.08.3/core/sound.cpp
Examining data/okular-20.08.3/core/action.cpp
Examining data/okular-20.08.3/core/synctex/synctex_parser_advanced.h
Examining data/okular-20.08.3/core/synctex/synctex_parser.h
Examining data/okular-20.08.3/core/synctex/synctex_parser_utils.c
Examining data/okular-20.08.3/core/synctex/synctex_parser_local.h
Examining data/okular-20.08.3/core/synctex/synctex_parser.c
Examining data/okular-20.08.3/core/synctex/synctex_parser_utils.h
Examining data/okular-20.08.3/core/movie.cpp
Examining data/okular-20.08.3/core/scripter.cpp
Examining data/okular-20.08.3/core/textdocumentsettings_p.h
Examining data/okular-20.08.3/core/document.cpp
Examining data/okular-20.08.3/core/chooseenginedialog.cpp
Examining data/okular-20.08.3/core/printoptionswidget.h
Examining data/okular-20.08.3/core/view.h
Examining data/okular-20.08.3/core/form.h
Examining data/okular-20.08.3/core/form.cpp
Examining data/okular-20.08.3/core/audioplayer_p.h
Examining data/okular-20.08.3/core/misc.cpp
Examining data/okular-20.08.3/core/misc.h
Examining data/okular-20.08.3/core/document_p.h
Examining data/okular-20.08.3/core/printoptionswidget.cpp
Examining data/okular-20.08.3/core/textdocumentsettings.cpp
Examining data/okular-20.08.3/core/sound.h
Examining data/okular-20.08.3/core/movie.h
Examining data/okular-20.08.3/core/action.h
Examining data/okular-20.08.3/core/view.cpp
Examining data/okular-20.08.3/core/textdocumentsettings.h
Examining data/okular-20.08.3/core/pagetransition.h
Examining data/okular-20.08.3/core/audioplayer.h
Examining data/okular-20.08.3/core/annotations.h
Examining data/okular-20.08.3/core/audioplayer.cpp
Examining data/okular-20.08.3/core/debug_p.h
Examining data/okular-20.08.3/core/generator_p.h
Examining data/okular-20.08.3/core/generator_p.cpp
Examining data/okular-20.08.3/core/chooseenginedialog_p.h
Examining data/okular-20.08.3/core/utils.h
Examining data/okular-20.08.3/core/sourcereference.h
Examining data/okular-20.08.3/core/textpage.h
Examining data/okular-20.08.3/core/page_p.h
Examining data/okular-20.08.3/core/rotationjob.cpp
Examining data/okular-20.08.3/core/page.h
Examining data/okular-20.08.3/core/scripter.h
Examining data/okular-20.08.3/core/document.h
Examining data/okular-20.08.3/core/documentcommands.cpp
Examining data/okular-20.08.3/core/tilesmanager.cpp
Examining data/okular-20.08.3/core/pagecontroller.cpp
Examining data/okular-20.08.3/core/textdocumentgenerator_p.h
Examining data/okular-20.08.3/core/pagesize.cpp
Examining data/okular-20.08.3/core/page.cpp
Examining data/okular-20.08.3/core/pagesize.h
Examining data/okular-20.08.3/core/area.cpp
Examining data/okular-20.08.3/core/observer.cpp
Examining data/okular-20.08.3/core/view_p.h
Examining data/okular-20.08.3/core/form_p.h
Examining data/okular-20.08.3/core/annotations_p.h
Examining data/okular-20.08.3/core/tile.h
Examining data/okular-20.08.3/core/utils.cpp
Examining data/okular-20.08.3/core/debug.cpp
Examining data/okular-20.08.3/core/textdocumentgenerator.h
Examining data/okular-20.08.3/core/global.h
Examining data/okular-20.08.3/core/annotations.cpp
Examining data/okular-20.08.3/core/tilesmanager_p.h
Examining data/okular-20.08.3/core/generator.cpp
Examining data/okular-20.08.3/core/sourcereference.cpp
Examining data/okular-20.08.3/core/utils_p.h
Examining data/okular-20.08.3/core/texteditors_p.h
Examining data/okular-20.08.3/core/sourcereference_p.h
Examining data/okular-20.08.3/core/area.h
Examining data/okular-20.08.3/core/textdocumentgenerator.cpp
Examining data/okular-20.08.3/core/signatureutils.h
Examining data/okular-20.08.3/core/textpage_p.h
Examining data/okular-20.08.3/core/observer.h
Examining data/okular-20.08.3/core/fileprinter.cpp
Examining data/okular-20.08.3/core/pagetransition.cpp
Examining data/okular-20.08.3/core/script/kjs_ocg.cpp
Examining data/okular-20.08.3/core/script/kjs_spell.cpp
Examining data/okular-20.08.3/core/script/kjs_console.cpp
Examining data/okular-20.08.3/core/script/kjs_event.cpp
Examining data/okular-20.08.3/core/script/kjs_field.cpp
Examining data/okular-20.08.3/core/script/kjs_data.cpp
Examining data/okular-20.08.3/core/script/kjs_data_p.h
Examining data/okular-20.08.3/core/script/kjs_app.cpp
Examining data/okular-20.08.3/core/script/executor_kjs.cpp
Examining data/okular-20.08.3/core/script/event.cpp
Examining data/okular-20.08.3/core/script/kjs_util_p.h
Examining data/okular-20.08.3/core/script/kjs_document_p.h
Examining data/okular-20.08.3/core/script/kjs_display_p.h
Examining data/okular-20.08.3/core/script/kjs_util.cpp
Examining data/okular-20.08.3/core/script/kjs_document.cpp
Examining data/okular-20.08.3/core/script/kjs_field_p.h
Examining data/okular-20.08.3/core/script/kjs_spell_p.h
Examining data/okular-20.08.3/core/script/kjs_fullscreen_p.h
Examining data/okular-20.08.3/core/script/kjs_event_p.h
Examining data/okular-20.08.3/core/script/kjs_app_p.h
Examining data/okular-20.08.3/core/script/kjs_fullscreen.cpp
Examining data/okular-20.08.3/core/script/executor_kjs_p.h
Examining data/okular-20.08.3/core/script/kjs_display.cpp
Examining data/okular-20.08.3/core/script/kjs_ocg_p.h
Examining data/okular-20.08.3/core/script/event_p.h
Examining data/okular-20.08.3/core/script/kjs_console_p.h
Examining data/okular-20.08.3/core/bookmarkmanager.cpp
Examining data/okular-20.08.3/core/generator.h
Examining data/okular-20.08.3/core/bookmarkmanager.h
Examining data/okular-20.08.3/core/fontinfo.cpp
Examining data/okular-20.08.3/core/documentcommands_p.h
Examining data/okular-20.08.3/core/fileprinter.h
Examining data/okular-20.08.3/core/signatureutils.cpp
Examining data/okular-20.08.3/core/fontinfo.h
Examining data/okular-20.08.3/core/pagecontroller_p.h
Examining data/okular-20.08.3/part.h
Examining data/okular-20.08.3/generators/dvi/TeXFont_TFM.cpp
Examining data/okular-20.08.3/generators/dvi/fontMap.cpp
Examining data/okular-20.08.3/generators/dvi/dviexport.h
Examining data/okular-20.08.3/generators/dvi/dviRenderer.h
Examining data/okular-20.08.3/generators/dvi/TeXFont.h
Examining data/okular-20.08.3/generators/dvi/dvisourcesplitter.h
Examining data/okular-20.08.3/generators/dvi/pageSize.h
Examining data/okular-20.08.3/generators/dvi/dviRenderer.cpp
Examining data/okular-20.08.3/generators/dvi/TeXFont_PFB.h
Examining data/okular-20.08.3/generators/dvi/fontMap.h
Examining data/okular-20.08.3/generators/dvi/debug_dvi.h
Examining data/okular-20.08.3/generators/dvi/TeXFont_PK.h
Examining data/okular-20.08.3/generators/dvi/xdvi.h
Examining data/okular-20.08.3/generators/dvi/dviPageInfo.h
Examining data/okular-20.08.3/generators/dvi/glyph.h
Examining data/okular-20.08.3/generators/dvi/special.cpp
Examining data/okular-20.08.3/generators/dvi/vf.cpp
Examining data/okular-20.08.3/generators/dvi/psheader.cpp
Examining data/okular-20.08.3/generators/dvi/length.cpp
Examining data/okular-20.08.3/generators/dvi/fontpool.cpp
Examining data/okular-20.08.3/generators/dvi/TeXFont_PK.cpp
Examining data/okular-20.08.3/generators/dvi/pageSize.cpp
Examining data/okular-20.08.3/generators/dvi/dviFile.h
Examining data/okular-20.08.3/generators/dvi/pageNumber.h
Examining data/okular-20.08.3/generators/dvi/generator_dvi.cpp
Examining data/okular-20.08.3/generators/dvi/TeXFont.cpp
Examining data/okular-20.08.3/generators/dvi/TeXFont_PFB.cpp
Examining data/okular-20.08.3/generators/dvi/psgs.cpp
Examining data/okular-20.08.3/generators/dvi/TeXFont_TFM.h
Examining data/okular-20.08.3/generators/dvi/textBox.h
Examining data/okular-20.08.3/generators/dvi/fontEncoding.h
Examining data/okular-20.08.3/generators/dvi/dviRenderer_dr.cpp
Examining data/okular-20.08.3/generators/dvi/config.h
Examining data/okular-20.08.3/generators/dvi/hyperlink.h
Examining data/okular-20.08.3/generators/dvi/psgs.h
Examining data/okular-20.08.3/generators/dvi/simplePageSize.h
Examining data/okular-20.08.3/generators/dvi/fontpool.h
Examining data/okular-20.08.3/generators/dvi/dviRenderer_draw.cpp
Examining data/okular-20.08.3/generators/dvi/dviFile.cpp
Examining data/okular-20.08.3/generators/dvi/TeXFontDefinition.cpp
Examining data/okular-20.08.3/generators/dvi/dviPageInfo.cpp
Examining data/okular-20.08.3/generators/dvi/bigEndianByteReader.h
Examining data/okular-20.08.3/generators/dvi/fontEncodingPool.cpp
Examining data/okular-20.08.3/generators/dvi/anchor.h
Examining data/okular-20.08.3/generators/dvi/glyph.cpp
Examining data/okular-20.08.3/generators/dvi/dvisourcesplitter.cpp
Examining data/okular-20.08.3/generators/dvi/fontEncodingPool.h
Examining data/okular-20.08.3/generators/dvi/length.h
Examining data/okular-20.08.3/generators/dvi/TeXFontDefinition.h
Examining data/okular-20.08.3/generators/dvi/bigEndianByteReader.cpp
Examining data/okular-20.08.3/generators/dvi/dviexport.cpp
Examining data/okular-20.08.3/generators/dvi/util.cpp
Examining data/okular-20.08.3/generators/dvi/simplePageSize.cpp
Examining data/okular-20.08.3/generators/dvi/dviRenderer_prescan.cpp
Examining data/okular-20.08.3/generators/dvi/fontEncoding.cpp
Examining data/okular-20.08.3/generators/dvi/prebookmark.h
Examining data/okular-20.08.3/generators/dvi/generator_dvi.h
Examining data/okular-20.08.3/generators/dvi/dvi.h
Examining data/okular-20.08.3/generators/plucker/unpluck/unpluckint.h
Examining data/okular-20.08.3/generators/plucker/unpluck/image.cpp
Examining data/okular-20.08.3/generators/plucker/unpluck/qunpluck.h
Examining data/okular-20.08.3/generators/plucker/unpluck/qunpluck.cpp
Examining data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp
Examining data/okular-20.08.3/generators/plucker/unpluck/unpluck.h
Examining data/okular-20.08.3/generators/plucker/unpluck/image.h
Examining data/okular-20.08.3/generators/plucker/unpluck/util.cpp
Examining data/okular-20.08.3/generators/plucker/unpluck/config.cpp
Examining data/okular-20.08.3/generators/plucker/generator_plucker.cpp
Examining data/okular-20.08.3/generators/plucker/generator_plucker.h
Examining data/okular-20.08.3/generators/comicbook/unrarflavours.cpp
Examining data/okular-20.08.3/generators/comicbook/qnatsort.h
Examining data/okular-20.08.3/generators/comicbook/document.cpp
Examining data/okular-20.08.3/generators/comicbook/unrar.cpp
Examining data/okular-20.08.3/generators/comicbook/autotests/comicbooktest.cpp
Examining data/okular-20.08.3/generators/comicbook/directory.h
Examining data/okular-20.08.3/generators/comicbook/generator_comicbook.cpp
Examining data/okular-20.08.3/generators/comicbook/debug_comicbook.h
Examining data/okular-20.08.3/generators/comicbook/document.h
Examining data/okular-20.08.3/generators/comicbook/qnatsort.cpp
Examining data/okular-20.08.3/generators/comicbook/generator_comicbook.h
Examining data/okular-20.08.3/generators/comicbook/unrarflavours.h
Examining data/okular-20.08.3/generators/comicbook/unrar.h
Examining data/okular-20.08.3/generators/comicbook/directory.cpp
Examining data/okular-20.08.3/generators/poppler/annots.cpp
Examining data/okular-20.08.3/generators/poppler/generator_pdf.h
Examining data/okular-20.08.3/generators/poppler/pdfsignatureutils.h
Examining data/okular-20.08.3/generators/poppler/pdfsignatureutils.cpp
Examining data/okular-20.08.3/generators/poppler/formfields.h
Examining data/okular-20.08.3/generators/poppler/debug_pdf.h
Examining data/okular-20.08.3/generators/poppler/annots.h
Examining data/okular-20.08.3/generators/poppler/formfields.cpp
Examining data/okular-20.08.3/generators/poppler/generator_pdf.cpp
Examining data/okular-20.08.3/generators/poppler/popplerembeddedfile.h
Examining data/okular-20.08.3/generators/txt/document.cpp
Examining data/okular-20.08.3/generators/txt/generator_txt.h
Examining data/okular-20.08.3/generators/txt/converter.h
Examining data/okular-20.08.3/generators/txt/generator_txt.cpp
Examining data/okular-20.08.3/generators/txt/document.h
Examining data/okular-20.08.3/generators/txt/debug_txt.h
Examining data/okular-20.08.3/generators/txt/converter.cpp
Examining data/okular-20.08.3/generators/fax/generator_fax.cpp
Examining data/okular-20.08.3/generators/fax/faxexpand.h
Examining data/okular-20.08.3/generators/fax/faxdocument.h
Examining data/okular-20.08.3/generators/fax/generator_fax.h
Examining data/okular-20.08.3/generators/fax/fax_debug.cpp
Examining data/okular-20.08.3/generators/fax/faxinit.cpp
Examining data/okular-20.08.3/generators/fax/faxdocument.cpp
Examining data/okular-20.08.3/generators/fax/faxexpand.cpp
Examining data/okular-20.08.3/generators/fax/fax_debug.h
Examining data/okular-20.08.3/generators/djvu/generator_djvu.h
Examining data/okular-20.08.3/generators/djvu/generator_djvu.cpp
Examining data/okular-20.08.3/generators/djvu/kdjvu.cpp
Examining data/okular-20.08.3/generators/djvu/kdjvu.h
Examining data/okular-20.08.3/generators/chm/generator_chm.cpp
Examining data/okular-20.08.3/generators/chm/autotests/chmgeneratortest.cpp
Examining data/okular-20.08.3/generators/chm/kio-msits/msits.h
Examining data/okular-20.08.3/generators/chm/kio-msits/msits.cpp
Examining data/okular-20.08.3/generators/chm/kio-msits/kio_mits_debug.cpp
Examining data/okular-20.08.3/generators/chm/kio-msits/kio_mits_debug.h
Examining data/okular-20.08.3/generators/chm/lib/ebook_chm.cpp
Examining data/okular-20.08.3/generators/chm/lib/ebook_chm.h
Examining data/okular-20.08.3/generators/chm/lib/helper_entitydecoder.cpp
Examining data/okular-20.08.3/generators/chm/lib/helperxmlhandler_epubcontainer.cpp
Examining data/okular-20.08.3/generators/chm/lib/helper_search_index.cpp
Examining data/okular-20.08.3/generators/chm/lib/ebook_search.cpp
Examining data/okular-20.08.3/generators/chm/lib/ebook_url.h
Examining data/okular-20.08.3/generators/chm/lib/libchmurlfactory.h
Examining data/okular-20.08.3/generators/chm/lib/ebook_chm_encoding.h
Examining data/okular-20.08.3/generators/chm/lib/helperxmlhandler_epubcontent.cpp
Examining data/okular-20.08.3/generators/chm/lib/helper_search_index.h
Examining data/okular-20.08.3/generators/chm/lib/ebook_epub.cpp
Examining data/okular-20.08.3/generators/chm/lib/helperxmlhandler_epubtoc.h
Examining data/okular-20.08.3/generators/chm/lib/ebook.h
Examining data/okular-20.08.3/generators/chm/lib/bitfiddle.h
Examining data/okular-20.08.3/generators/chm/lib/ebook_search.h
Examining data/okular-20.08.3/generators/chm/lib/helperxmlhandler_epubcontainer.h
Examining data/okular-20.08.3/generators/chm/lib/helper_entitydecoder.h
Examining data/okular-20.08.3/generators/chm/lib/ebook_epub.h
Examining data/okular-20.08.3/generators/chm/lib/ebook.cpp
Examining data/okular-20.08.3/generators/chm/lib/ebook_chm_encoding.cpp
Examining data/okular-20.08.3/generators/chm/lib/helperxmlhandler_epubtoc.cpp
Examining data/okular-20.08.3/generators/chm/lib/helperxmlhandler_epubcontent.h
Examining data/okular-20.08.3/generators/chm/generator_chm.h
Examining data/okular-20.08.3/generators/fictionbook/generator_fb.cpp
Examining data/okular-20.08.3/generators/fictionbook/document.cpp
Examining data/okular-20.08.3/generators/fictionbook/generator_fb.h
Examining data/okular-20.08.3/generators/fictionbook/converter.h
Examining data/okular-20.08.3/generators/fictionbook/document.h
Examining data/okular-20.08.3/generators/fictionbook/converter.cpp
Examining data/okular-20.08.3/generators/xps/generator_xps.cpp
Examining data/okular-20.08.3/generators/xps/generator_xps.h
Examining data/okular-20.08.3/generators/markdown/generator_md.cpp
Examining data/okular-20.08.3/generators/markdown/converter.h
Examining data/okular-20.08.3/generators/markdown/generator_md.h
Examining data/okular-20.08.3/generators/markdown/converter.cpp
Examining data/okular-20.08.3/generators/markdown/debug_md.h
Examining data/okular-20.08.3/generators/epub/generator_epub.h
Examining data/okular-20.08.3/generators/epub/autotests/epubgeneratortest.cpp
Examining data/okular-20.08.3/generators/epub/epubdocument.cpp
Examining data/okular-20.08.3/generators/epub/converter.h
Examining data/okular-20.08.3/generators/epub/converter.cpp
Examining data/okular-20.08.3/generators/epub/generator_epub.cpp
Examining data/okular-20.08.3/generators/epub/epubdocument.h
Examining data/okular-20.08.3/generators/mobipocket/converter.h
Examining data/okular-20.08.3/generators/mobipocket/mobidocument.h
Examining data/okular-20.08.3/generators/mobipocket/mobidocument.cpp
Examining data/okular-20.08.3/generators/mobipocket/converter.cpp
Examining data/okular-20.08.3/generators/mobipocket/generator_mobi.h
Examining data/okular-20.08.3/generators/mobipocket/generator_mobi.cpp
Examining data/okular-20.08.3/generators/tiff/generator_tiff.h
Examining data/okular-20.08.3/generators/tiff/generator_tiff.cpp
Examining data/okular-20.08.3/generators/spectre/rendererthread.h
Examining data/okular-20.08.3/generators/spectre/rendererthread.cpp
Examining data/okular-20.08.3/generators/spectre/generator_ghostview.cpp
Examining data/okular-20.08.3/generators/spectre/spectre_debug.cpp
Examining data/okular-20.08.3/generators/spectre/spectre_debug.h
Examining data/okular-20.08.3/generators/spectre/generator_ghostview.h
Examining data/okular-20.08.3/generators/ooo/document.cpp
Examining data/okular-20.08.3/generators/ooo/styleinformation.h
Examining data/okular-20.08.3/generators/ooo/manifest.h
Examining data/okular-20.08.3/generators/ooo/styleparser.h
Examining data/okular-20.08.3/generators/ooo/styleinformation.cpp
Examining data/okular-20.08.3/generators/ooo/manifest.cpp
Examining data/okular-20.08.3/generators/ooo/converter.h
Examining data/okular-20.08.3/generators/ooo/document.h
Examining data/okular-20.08.3/generators/ooo/converter.cpp
Examining data/okular-20.08.3/generators/ooo/styleparser.cpp
Examining data/okular-20.08.3/generators/ooo/generator_ooo.h
Examining data/okular-20.08.3/generators/ooo/formatproperty.h
Examining data/okular-20.08.3/generators/ooo/generator_ooo.cpp
Examining data/okular-20.08.3/generators/ooo/formatproperty.cpp
Examining data/okular-20.08.3/generators/kimgio/generator_kimgio.cpp
Examining data/okular-20.08.3/generators/kimgio/generator_kimgio.h
Examining data/okular-20.08.3/generators/kimgio/tests/kimgiotest.cpp
Examining data/okular-20.08.3/xmlgui_helper.cpp
Examining data/okular-20.08.3/interfaces/configinterface.h
Examining data/okular-20.08.3/interfaces/saveinterface.h
Examining data/okular-20.08.3/interfaces/printinterface.h
Examining data/okular-20.08.3/interfaces/viewerinterface.h
Examining data/okular-20.08.3/interfaces/guiinterface.h

FINAL RESULTS:

data/okular-20.08.3/part.cpp:2673:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        chmod(QFile::encodeName(saveFilePath).constData(), fileMode);
data/okular-20.08.3/core/document.cpp:249:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (QLocale::system().measurementSystem() == QLocale::ImperialSystem) {
data/okular-20.08.3/core/synctex/synctex_parser.c:324:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define SYNCTEX_PRINT_CHARINDEX printf(SYNCTEX_PRINT_CHARINDEX_FMT SYNCTEX_PRINT_CHARINDEX_WHAT)
data/okular-20.08.3/core/synctex/synctex_parser.c:327:33:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define SYNCTEX_PRINT_LINEINDEX printf(SYNCTEX_PRINT_LINEINDEX_FMT SYNCTEX_PRINT_LINEINDEX_WHAT)
data/okular-20.08.3/core/synctex/synctex_parser.c:328:36:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define SYNCTEX_PRINT_CHARINDEX_NL printf(SYNCTEX_PRINT_CHARINDEX_FMT "\n" SYNCTEX_PRINT_CHARINDEX_WHAT)
data/okular-20.08.3/core/synctex/synctex_parser.c:329:36:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define SYNCTEX_PRINT_LINEINDEX_NL printf(SYNCTEX_PRINT_CHARINDEX_FMT "\n" SYNCTEX_PRINT_LINEINDEX_WHAT)
data/okular-20.08.3/core/synctex/synctex_parser.c:575:25:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    if (open.synctex != strcpy(open.synctex, output)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:599:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    if (open.synctex != strcat(open.synctex, synctex_suffix)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:604:62:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    if (quoteless_synctex_name && (quoteless_synctex_name != strcat(quoteless_synctex_name, synctex_suffix))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:616:29:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        if (open.synctex != strcat(open.synctex, synctex_suffix_gz)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:623:66:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        if (quoteless_synctex_name && (quoteless_synctex_name != strcat(quoteless_synctex_name, synctex_suffix_gz))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:702:37:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                if (build_output != strcpy(build_output, output)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:708:33:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            if (build_output == strcat(build_output, build_directory)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:717:37:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                if (build_output != strcat(build_output, lpc)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:759:38:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        } else if (reader->output != strcpy(reader->output, output)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:3113:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract, SYNCTEX_ABSTRACT_MAX, "Input:%i:%s(%i)" SYNCTEX_PRINT_CHARINDEX_FMT, _synctex_data_tag(node), _synctex_data_name(node), _synctex_data_line(node) SYNCTEX_PRINT_CHARINDEX_WHAT);
data/okular-20.08.3/core/synctex/synctex_parser.c:3130:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract, SYNCTEX_ABSTRACT_MAX, "{%i...}" SYNCTEX_PRINT_CHARINDEX_FMT, _synctex_data_page(node) SYNCTEX_PRINT_CHARINDEX_WHAT);
data/okular-20.08.3/core/synctex/synctex_parser.c:3149:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract, SYNCTEX_ABSTRACT_MAX, "<%i...>" SYNCTEX_PRINT_CHARINDEX_FMT, _synctex_data_tag(node) SYNCTEX_PRINT_CHARINDEX_WHAT);
data/okular-20.08.3/core/synctex/synctex_parser.c:3169:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract,
data/okular-20.08.3/core/synctex/synctex_parser.c:3205:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract,
data/okular-20.08.3/core/synctex/synctex_parser.c:3279:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract,
data/okular-20.08.3/core/synctex/synctex_parser.c:3313:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract, SYNCTEX_ABSTRACT_MAX, "glue:%i,%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT, _synctex_data_tag(node), _synctex_data_line(node), _synctex_data_h(node), _synctex_data_v(node) SYNCTEX_PRINT_CHARINDEX_WHAT);
data/okular-20.08.3/core/synctex/synctex_parser.c:3330:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract,
data/okular-20.08.3/core/synctex/synctex_parser.c:3364:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract, SYNCTEX_ABSTRACT_MAX, "math:%i,%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT, _synctex_data_tag(node), _synctex_data_line(node), _synctex_data_h(node), _synctex_data_v(node) SYNCTEX_PRINT_CHARINDEX_WHAT);
data/okular-20.08.3/core/synctex/synctex_parser.c:3381:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract,
data/okular-20.08.3/core/synctex/synctex_parser.c:3411:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract, SYNCTEX_ABSTRACT_MAX, "boundary:%i,%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT, _synctex_data_tag(node), _synctex_data_line(node), _synctex_data_h(node), _synctex_data_v(node) SYNCTEX_PRINT_CHARINDEX_WHAT);
data/okular-20.08.3/core/synctex/synctex_parser.c:3428:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract, SYNCTEX_ABSTRACT_MAX, "box bdry:%i,%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT, _synctex_data_tag(node), _synctex_data_line(node), _synctex_data_h(node), _synctex_data_v(node) SYNCTEX_PRINT_CHARINDEX_WHAT);
data/okular-20.08.3/core/synctex/synctex_parser.c:3446:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract, SYNCTEX_ABSTRACT_MAX, "form ref:%i:%i,%i" SYNCTEX_PRINT_CHARINDEX_FMT, _synctex_data_tag(node), _synctex_data_h(node), _synctex_data_v(node) SYNCTEX_PRINT_CHARINDEX_WHAT);
data/okular-20.08.3/core/synctex/synctex_parser.c:3485:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract,
data/okular-20.08.3/core/synctex/synctex_parser.c:3521:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(abstract,
data/okular-20.08.3/core/synctex/synctex_parser.c:8128:18:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        result = vfprintf(updater->file.as_FILE_p, format, va);
data/okular-20.08.3/core/synctex/synctex_parser_advanced.h:460:13:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            printf((desc), ##__VA_ARGS__);                                                                                                                                                                                                     \
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:130:18:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
        result = vsprintf(buff, reason, arg) + strlen(prompt);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:153:15:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    result += vfprintf(where, reason, arg);
data/okular-20.08.3/core/synctex/synctex_parser_utils.h:88:62:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define SYNCTEX_PRINTF_FORMAT(si, ftc) __attribute__((format(printf, si, ftc)))
data/okular-20.08.3/generators/dvi/pageSize.cpp:190:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (QLocale::system().measurementSystem() == QLocale::MetricSystem)
data/okular-20.08.3/generators/dvi/pageSize.cpp:287:22:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        if (QLocale::system().measurementSystem() == QLocale::MetricSystem)
data/okular-20.08.3/generators/dvi/pageSize.cpp:326:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (QLocale::system().measurementSystem() == QLocale::MetricSystem)
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:146:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(charptr, str_begin);
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:224:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(filename, dir);
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:225:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(filename + strlen(filename), STRINGIFY(FILE_SEPARATOR_CHAR_S));
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:226:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(filename + strlen(filename), name);
data/okular-20.08.3/generators/plucker/unpluck/unpluckint.h:119:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format(printf, 1, 2)))
data/okular-20.08.3/generators/plucker/unpluck/util.cpp:60:15:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        (void)vfprintf(stderr, formatSpec, ap);
data/okular-20.08.3/core/audioplayer.cpp:108:26:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        newid = KRandom::random();
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:237:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *home = getenv("HOME"); // clazy:exclude=raw-environment-function
data/okular-20.08.3/ui/presentationwidget.cpp:1802:43:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        return defaultTransition(KRandom::random() % 18);
data/okular-20.08.3/ui/presentationwidget.cpp:2068:36:  [3] (random) drand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            int n1 = (int)(steps * drand48());
data/okular-20.08.3/ui/presentationwidget.cpp:2069:36:  [3] (random) drand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            int n2 = (int)(steps * drand48());
data/okular-20.08.3/ui/presentationwidget.cpp:2147:36:  [3] (random) drand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            int n1 = (int)(steps * drand48());
data/okular-20.08.3/ui/presentationwidget.cpp:2148:36:  [3] (random) drand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            int n2 = (int)(steps * drand48());
data/okular-20.08.3/autotests/documenttest.cpp:108:30:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(migratedSaveFile.open());
data/okular-20.08.3/autotests/mainshelltest.cpp:538:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(configFile.open());
data/okular-20.08.3/autotests/parttest.cpp:785:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        saveFile.open();
data/okular-20.08.3/autotests/parttest.cpp:804:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    newFile.open();
data/okular-20.08.3/autotests/parttest.cpp:809:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        linkFile.open();
data/okular-20.08.3/autotests/parttest.cpp:834:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        newFile.open();
data/okular-20.08.3/autotests/parttest.cpp:844:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        linkFile.open();
data/okular-20.08.3/autotests/parttest.cpp:876:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(archiveSave.open());
data/okular-20.08.3/autotests/parttest.cpp:878:30:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(nativeDirectSave.open());
data/okular-20.08.3/autotests/parttest.cpp:880:35:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(nativeFromArchiveFile.open());
data/okular-20.08.3/autotests/parttest.cpp:1056:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(saveFile1.open());
data/okular-20.08.3/autotests/parttest.cpp:1059:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(saveFile2.open());
data/okular-20.08.3/autotests/parttest.cpp:1243:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(saveFile.open());
data/okular-20.08.3/autotests/parttest.cpp:1470:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(saveFile.open());
data/okular-20.08.3/autotests/visibilitytest.cpp:126:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(saveFile.open());
data/okular-20.08.3/core/audioplayer.cpp:69:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            m_buffer->open(QIODevice::ReadOnly);
data/okular-20.08.3/core/document.cpp:429:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!memFile.open(QIODevice::ReadOnly))
data/okular-20.08.3/core/document.cpp:476:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!memFile.open(QIODevice::ReadOnly))
data/okular-20.08.3/core/document.cpp:565:41:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!infoFile.exists() || !infoFile.open(QIODevice::ReadOnly))
data/okular-20.08.3/core/document.cpp:900:30:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (!m_tempFile->open()) {
data/okular-20.08.3/core/document.cpp:948:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (infoFile->open()) {
data/okular-20.08.3/core/document.cpp:1180:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!infoFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
data/okular-20.08.3/core/document.cpp:1974:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!f.open(QIODevice::ReadOnly))
data/okular-20.08.3/core/document.cpp:2294:33:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        const bool ret = qstdin.open(fd, QIODevice::ReadOnly, QFileDevice::AutoCloseHandle);
data/okular-20.08.3/core/document.cpp:4637:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!okularArchive.open(QIODevice::ReadOnly))
data/okular-20.08.3/core/document.cpp:4691:32:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!archiveData->document.open())
data/okular-20.08.3/core/document.cpp:4706:39:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (archiveData->metadataFile.open()) {
data/okular-20.08.3/core/document.cpp:4751:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!okularArchive.open(QIODevice::WriteOnly))
data/okular-20.08.3/core/document.cpp:4783:27:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!modifiedFile.open())
data/okular-20.08.3/core/document.cpp:4900:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!f.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/core/movie.cpp:68:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (d->m_tmp->open()) {
data/okular-20.08.3/core/scripter.cpp:62:30:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!builtInResource.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:567:50:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    const char *mode = _synctex_get_io_mode_name(open.io_mode);
data/okular-20.08.3/core/synctex/synctex_parser.c:569:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (NULL == (open.synctex = (char *)malloc(size))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:571:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        return open;
data/okular-20.08.3/core/synctex/synctex_parser.c:575:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (open.synctex != strcpy(open.synctex, output)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:575:32:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (open.synctex != strcpy(open.synctex, output)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:578:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        free(open.synctex);
data/okular-20.08.3/core/synctex/synctex_parser.c:579:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        open.synctex = NULL;
data/okular-20.08.3/core/synctex/synctex_parser.c:581:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        return open;
data/okular-20.08.3/core/synctex/synctex_parser.c:584:40:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    _synctex_strip_last_path_extension(open.synctex);
data/okular-20.08.3/core/synctex/synctex_parser.c:585:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!strlen(open.synctex)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:591:60:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (_synctex_copy_with_quoting_last_path_component(open.synctex, &quoted, size) || quoted == NULL) {
data/okular-20.08.3/core/synctex/synctex_parser.c:595:34:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        quoteless_synctex_name = open.synctex;
data/okular-20.08.3/core/synctex/synctex_parser.c:596:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        open.synctex = quoted;
data/okular-20.08.3/core/synctex/synctex_parser.c:599:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (open.synctex != strcat(open.synctex, synctex_suffix)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:599:32:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (open.synctex != strcat(open.synctex, synctex_suffix)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:608:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (NULL == (open.file = gzopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:608:37:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (NULL == (open.file = gzopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:612:61:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            _synctex_error("could not open %s, error %i\n", open.synctex, errno);
data/okular-20.08.3/core/synctex/synctex_parser.c:616:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (open.synctex != strcat(open.synctex, synctex_suffix_gz)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:616:36:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (open.synctex != strcat(open.synctex, synctex_suffix_gz)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:620:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        open.io_mode |= synctex_io_gz_mask;
data/okular-20.08.3/core/synctex/synctex_parser.c:621:42:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        mode = _synctex_get_io_mode_name(open.io_mode); /* the file is a compressed and is a binary file, this caused errors on Windows */
data/okular-20.08.3/core/synctex/synctex_parser.c:627:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (NULL == (open.file = gzopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:627:41:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (NULL == (open.file = gzopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:631:65:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                _synctex_error("Could not open %s, error %i\n", open.synctex, errno);
data/okular-20.08.3/core/synctex/synctex_parser.c:639:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        gzclose(open.file);
data/okular-20.08.3/core/synctex/synctex_parser.c:640:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (rename(open.synctex, quoteless_synctex_name)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:641:69:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            _synctex_error("Could not rename %s to %s, error %i\n", open.synctex, quoteless_synctex_name, errno);
data/okular-20.08.3/core/synctex/synctex_parser.c:643:26:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (NULL == (open.file = gzopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:643:45:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (NULL == (open.file = gzopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:648:75:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                    _synctex_error("Could not open again %s, error %i\n", open.synctex, errno);
data/okular-20.08.3/core/synctex/synctex_parser.c:654:26:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (NULL == (open.file = gzopen(quoteless_synctex_name, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:663:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            free(open.synctex);
data/okular-20.08.3/core/synctex/synctex_parser.c:664:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            open.synctex = quoteless_synctex_name;
data/okular-20.08.3/core/synctex/synctex_parser.c:669:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    open.status = SYNCTEX_STATUS_OK;
data/okular-20.08.3/core/synctex/synctex_parser.c:670:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return open;
data/okular-20.08.3/core/synctex/synctex_parser.c:683:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (open.status == SYNCTEX_STATUS_OK) {
data/okular-20.08.3/core/synctex/synctex_parser.c:684:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        return open;
data/okular-20.08.3/core/synctex/synctex_parser.c:704:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                    return open;
data/okular-20.08.3/core/synctex/synctex_parser.c:713:32:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                        return open;
data/okular-20.08.3/core/synctex/synctex_parser.c:719:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                    return open;
data/okular-20.08.3/core/synctex/synctex_parser.c:726:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return open;
data/okular-20.08.3/core/synctex/synctex_parser.c:747:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (open.status < SYNCTEX_STATUS_OK) {
data/okular-20.08.3/core/synctex/synctex_parser.c:749:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (open.status < SYNCTEX_STATUS_OK) {
data/okular-20.08.3/core/synctex/synctex_parser.c:754:27:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        reader->synctex = open.synctex;
data/okular-20.08.3/core/synctex/synctex_parser.c:755:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        reader->file = open.file;
data/okular-20.08.3/core/synctex/synctex_parser.c:2842:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char *isa[synctex_node_number_of_types] = {"Not a node", "input", "sheet", "form",     "ref",      "vbox",  "void vbox",  "hbox",       "void hbox",  "kern",
data/okular-20.08.3/core/synctex/synctex_parser.c:3111:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3128:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3147:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3167:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3203:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3243:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3277:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3311:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3328:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3362:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3379:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3409:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3426:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3444:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3461:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3483:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3519:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3560:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char abstract[SYNCTEX_ABSTRACT_MAX] = "none";
data/okular-20.08.3/core/synctex/synctex_parser.c:3997:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            if (memcpy(string + already_len, SYNCTEX_CUR, len)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8194:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    synctex_open_s open;
data/okular-20.08.3/core/synctex/synctex_parser.c:8202:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (open.status < SYNCTEX_STATUS_OK) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8204:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (open.status < SYNCTEX_STATUS_OK) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8212:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    gzclose(open.file);
data/okular-20.08.3/core/synctex/synctex_parser.c:8214:38:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    mode = _synctex_get_io_mode_name(open.io_mode | synctex_io_append_mask); /* either "a" or "ab", depending on the file extension */
data/okular-20.08.3/core/synctex/synctex_parser.c:8215:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (open.io_mode & synctex_io_gz_mask) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8216:48:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (NULL == (updater->file.as_FILE_p = fopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8216:54:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (NULL == (updater->file.as_FILE_p = fopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8218:84:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            _synctex_error("!  synctex_updater_new_with_file: Can't append to %s", open.synctex);
data/okular-20.08.3/core/synctex/synctex_parser.c:8219:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            free(open.synctex);
data/okular-20.08.3/core/synctex/synctex_parser.c:8225:55:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (NULL == (updater->file.as_gzFile = gzopen(open.synctex, mode))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8231:39:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    printf("SyncTeX: updating %s...", open.synctex);
data/okular-20.08.3/core/synctex/synctex_parser.c:8232:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    _synctex_free(open.synctex);
data/okular-20.08.3/core/synctex/synctex_parser.c:8289:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(copy, name, strlen(name) + 1);
data/okular-20.08.3/core/synctex/synctex_parser.c:8489:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char n[25]; /* name */
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:583:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            FILE *F = fopen(synctex_name, "r");
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:600:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char *synctex_io_modes[4] = {"r", "rb", "a", "ab"};
data/okular-20.08.3/core/textdocumentgenerator.cpp:496:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!file.open(QIODevice::WriteOnly))
data/okular-20.08.3/core/textdocumentgenerator.cpp:507:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!file.open(QIODevice::WriteOnly))
data/okular-20.08.3/core/textpage.cpp:149:18:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            std::memcpy(d.data, text.constData(), length * sizeof(QChar));
data/okular-20.08.3/generators/chm/lib/ebook_chm.cpp:553:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buffer[BUF_SIZE];
data/okular-20.08.3/generators/chm/lib/ebook_chm.cpp:620:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buffer[BUF_SIZE];
data/okular-20.08.3/generators/chm/lib/ebook_epub.cpp:54:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!m_epubFile.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/comicbook/autotests/comicbooktest.cpp:44:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    QVERIFY(document.open(testFile));
data/okular-20.08.3/generators/comicbook/directory.cpp:28:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool Directory::open(const QString &dirName)
data/okular-20.08.3/generators/comicbook/directory.cpp:62:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!file->open(QIODevice::ReadOnly))
data/okular-20.08.3/generators/comicbook/directory.h:34:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bool open(const QString &dirName);
data/okular-20.08.3/generators/comicbook/document.cpp:60:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool Document::open(const QString &fileName)
data/okular-20.08.3/generators/comicbook/document.cpp:112:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!mUnrar->open(fileName)) {
data/okular-20.08.3/generators/comicbook/document.cpp:123:26:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!mDirectory->open(fileName)) {
data/okular-20.08.3/generators/comicbook/document.cpp:158:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!mArchive->open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/comicbook/document.h:34:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bool open(const QString &fileName);
data/okular-20.08.3/generators/comicbook/generator_comicbook.cpp:40:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!mDocument.open(fileName)) {
data/okular-20.08.3/generators/comicbook/unrar.cpp:114:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool Unrar::open(const QString &fileName)
data/okular-20.08.3/generators/comicbook/unrar.cpp:174:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!file.open(QIODevice::ReadOnly))
data/okular-20.08.3/generators/comicbook/unrar.cpp:186:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!file->open(QIODevice::ReadOnly))
data/okular-20.08.3/generators/comicbook/unrar.h:44:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bool open(const QString &fileName);
data/okular-20.08.3/generators/djvu/generator_djvu.cpp:167:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!tf.open())
data/okular-20.08.3/generators/djvu/kdjvu.cpp:950:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f.open(QIODevice::ReadWrite);
data/okular-20.08.3/generators/dvi/TeXFontDefinition.cpp:97:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(QFile::encodeName(filename).constData(), "r");
data/okular-20.08.3/generators/dvi/TeXFontDefinition.cpp:103:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        file = fopen(QFile::encodeName(filename_test).constData(), "r");
data/okular-20.08.3/generators/dvi/TeXFont_PK.cpp:85:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(QFile::encodeName(parent->filename).constData(), "r");
data/okular-20.08.3/generators/dvi/TeXFont_PK.cpp:589:47:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char *bitmapData = (unsigned char *)characterBitmaps[ch]->bits;
data/okular-20.08.3/generators/dvi/TeXFont_TFM.cpp:28:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!file.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/dvi/dviFile.cpp:134:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char job_id[300];
data/okular-20.08.3/generators/dvi/dviFile.cpp:281:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file.open(QIODevice::ReadOnly);
data/okular-20.08.3/generators/dvi/dviFile.cpp:365:20:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    QTemporaryFile tmpfile;
data/okular-20.08.3/generators/dvi/dviFile.cpp:366:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile.open();
data/okular-20.08.3/generators/dvi/dviFile.cpp:366:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    tmpfile.open();
data/okular-20.08.3/generators/dvi/dviFile.cpp:367:39:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    const QString convertedFileName = tmpfile.fileName();
data/okular-20.08.3/generators/dvi/dviFile.cpp:368:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile.close();
data/okular-20.08.3/generators/dvi/dviFile.cpp:422:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile.setAutoRemove(false);
data/okular-20.08.3/generators/dvi/dviFile.cpp:432:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (out.open(QIODevice::WriteOnly) == false)
data/okular-20.08.3/generators/dvi/dviRenderer.cpp:394:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!f.open(QIODevice::ReadOnly))
data/okular-20.08.3/generators/dvi/dviRenderer.cpp:397:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char test[4];
data/okular-20.08.3/generators/dvi/dviRenderer.cpp:406:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char trailer[4] = {0xdf, 0xdf, 0xdf, 0xdf};
data/okular-20.08.3/generators/dvi/dviRenderer_prescan.cpp:141:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (file.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/dvi/dviRenderer_prescan.cpp:161:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(newDVI.data(), dviFile->dvi_Data(), beginningOfSpecialCommand - dviFile->dvi_Data());
data/okular-20.08.3/generators/dvi/dviRenderer_prescan.cpp:166:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(newDVI.data() + (beginningOfSpecialCommand - dviFile->dvi_Data()) + 5, PS.toLatin1().constData(), PS.length());
data/okular-20.08.3/generators/dvi/dviRenderer_prescan.cpp:167:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(
data/okular-20.08.3/generators/dvi/dviexport.cpp:205:24:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        QTemporaryFile tmpfile;
data/okular-20.08.3/generators/dvi/dviexport.cpp:206:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        tmpfile.setAutoRemove(false);
data/okular-20.08.3/generators/dvi/dviexport.cpp:207:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        tmpfile.open();
data/okular-20.08.3/generators/dvi/dviexport.cpp:207:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        tmpfile.open();
data/okular-20.08.3/generators/dvi/dviexport.cpp:208:25:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        tmpfile_name_ = tmpfile.fileName();
data/okular-20.08.3/generators/dvi/dviexport.cpp:209:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        tmpfile.close();
data/okular-20.08.3/generators/dvi/fontEncoding.cpp:55:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (file.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/dvi/fontMap.cpp:69:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (file.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/dvi/generator_dvi.cpp:472:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!tf.open())
data/okular-20.08.3/generators/dvi/psgs.cpp:166:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    PSfile.open();
data/okular-20.08.3/generators/dvi/psgs.cpp:324:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    gfxFile.open();
data/okular-20.08.3/generators/epub/epubdocument.cpp:104:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (!tmp->open())
data/okular-20.08.3/generators/fax/faxdocument.cpp:75:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char b[2];
data/okular-20.08.3/generators/fax/faxdocument.cpp:81:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!file.open(QIODevice::ReadOnly))
data/okular-20.08.3/generators/fax/faxexpand.cpp:666:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char zerotab[256] = {0x88, 0x07, 0x16, 0x06, 0x25, 0x05, 0x15, 0x05, 0x34, 0x04, 0x14, 0x04, 0x24, 0x04, 0x14, 0x04, 0x43, 0x03, 0x13, 0x03, 0x23, 0x03, 0x13, 0x03, 0x33, 0x03, 0x13, 0x03, 0x23, 0x03, 0x13, 0x03,
data/okular-20.08.3/generators/fictionbook/converter.cpp:69:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!fbDocument.open()) {
data/okular-20.08.3/generators/fictionbook/document.cpp:24:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool Document::open()
data/okular-20.08.3/generators/fictionbook/document.cpp:31:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!file.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/fictionbook/document.cpp:38:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!zip.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/fictionbook/document.h:25:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bool open();
data/okular-20.08.3/generators/kimgio/generator_kimgio.cpp:55:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!f.open(QFile::ReadOnly)) {
data/okular-20.08.3/generators/kimgio/generator_kimgio.cpp:71:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    buffer.open(QIODevice::ReadOnly);
data/okular-20.08.3/generators/markdown/converter.cpp:60:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    m_markdownFile = fopen(fileName.toLocal8Bit(), "rb");
data/okular-20.08.3/generators/ooo/converter.cpp:79:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!oooDocument.open(password)) {
data/okular-20.08.3/generators/ooo/document.cpp:24:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool Document::open(const QString &password)
data/okular-20.08.3/generators/ooo/document.cpp:30:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!zip.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/generators/ooo/document.h:30:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bool open(const QString &password);
data/okular-20.08.3/generators/ooo/manifest.cpp:307:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    decompresserDevice->open(QIODevice::ReadOnly);
data/okular-20.08.3/generators/plucker/generator_plucker.cpp:63:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!unpluck.open(fileName))
data/okular-20.08.3/generators/plucker/generator_plucker.cpp:167:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!file.open(QIODevice::WriteOnly))
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:72:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fp = fopen(filename, "r");
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:79:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char linebuf[MAX_LINE_SIZE + 1];
data/okular-20.08.3/generators/plucker/unpluck/image.cpp:201:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    tempFile.open();
data/okular-20.08.3/generators/plucker/unpluck/image.cpp:202:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *outfile = fopen(QFile::encodeName(tempFile.fileName()).constData(), "w");
data/okular-20.08.3/generators/plucker/unpluck/image.cpp:263:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(lastrow, rowbuf, bytes_per_row);
data/okular-20.08.3/generators/plucker/unpluck/image.cpp:265:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(rowbuf, palm_ptr, bytes_per_row);
data/okular-20.08.3/generators/plucker/unpluck/image.cpp:457:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(outptr, acell->bytes, acell->bytes_per_row);
data/okular-20.08.3/generators/plucker/unpluck/qunpluck.cpp:119:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool QUnpluck::open(const QString &fileName)
data/okular-20.08.3/generators/plucker/unpluck/qunpluck.h:57:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bool open(const QString &fileName);
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:121:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char keybuf[OWNER_ID_HASH_LEN];
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:263:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buffer, record->cache, record->cached_size);
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:290:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(tbuffer, buf, 8);
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:297:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(output_ptr, start_of_data, 4 * record->nparagraphs);
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:519:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char utilbuf[128];
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:520:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char id_stamp[9] = "DataPlkr";
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:799:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = open(filename, O_RDONLY);
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:801:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = open(filename, O_RDONLY | O_BINARY);
data/okular-20.08.3/generators/plucker/unpluck/unpluckint.h:104:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char owner_id_key[40];
data/okular-20.08.3/generators/poppler/generator_pdf.cpp:1376:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!tf.open()) {
data/okular-20.08.3/generators/poppler/generator_pdf.cpp:1577:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!f.open(QIODevice::WriteOnly))
data/okular-20.08.3/generators/spectre/generator_ghostview.cpp:104:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!tf.open())
data/okular-20.08.3/generators/tiff/generator_tiff.cpp:183:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    qfile->open(QIODevice::ReadOnly);
data/okular-20.08.3/generators/tiff/generator_tiff.cpp:193:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    qbuffer->open(QIODevice::ReadOnly);
data/okular-20.08.3/generators/txt/document.cpp:30:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!plainFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
data/okular-20.08.3/generators/xps/generator_xps.cpp:1528:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    buffer.open(QBuffer::ReadOnly);
data/okular-20.08.3/generators/xps/generator_xps.cpp:1826:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (m_xpsArchive->open(QIODevice::ReadOnly) == true) {
data/okular-20.08.3/generators/xps/generator_xps.cpp:2092:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!f.open(QIODevice::WriteOnly))
data/okular-20.08.3/part.cpp:137:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const QString &path)
data/okular-20.08.3/part.cpp:140:29:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            m_handle = std::fopen(QFile::encodeName(path).constData(), "r");
data/okular-20.08.3/part.cpp:158:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        retFile->open();
data/okular-20.08.3/part.cpp:1279:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (!tf.open())
data/okular-20.08.3/part.cpp:1564:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            m_keeper->open(fileNameToOpen);
data/okular-20.08.3/part.cpp:2458:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!tf.open()) {
data/okular-20.08.3/part.cpp:2817:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    tf.open();
data/okular-20.08.3/part.cpp:2929:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    d->open();
data/okular-20.08.3/part.cpp:2936:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    d->open();
data/okular-20.08.3/part.cpp:3262:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!newtempfile->open()) {
data/okular-20.08.3/part.cpp:3274:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!dev.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/part.cpp:3291:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[65536];
data/okular-20.08.3/shell/okular_main.cpp:89:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (!tempFile->open() || !stdinFile.open(stdin, QIODevice::ReadOnly))
data/okular-20.08.3/shell/okular_main.cpp:89:49:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (!tempFile->open() || !stdinFile.open(stdin, QIODevice::ReadOnly))
data/okular-20.08.3/shell/shell.cpp:323:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    KStandardAction::open(this, SLOT(fileOpen()), actionCollection());
data/okular-20.08.3/ui/bookmarklist.cpp:287:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (res == open) {
data/okular-20.08.3/ui/certificateviewer.cpp:319:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        targetFile.open(QIODevice::WriteOnly);
data/okular-20.08.3/ui/guiutils.cpp:226:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!target.open(QIODevice::WriteOnly)) {
data/okular-20.08.3/ui/latexrenderer.cpp:120:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    tempFile->open();
data/okular-20.08.3/ui/propertiesdialog.cpp:238:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if (f.open(QIODevice::WriteOnly)) {
data/okular-20.08.3/ui/revisionviewer.cpp:77:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!tf.open()) {
data/okular-20.08.3/xmlgui_helper.cpp:93:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (f.open(QIODevice::ReadOnly)) {
data/okular-20.08.3/core/bookmarkmanager.cpp:73:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if (!equal)
data/okular-20.08.3/core/document.cpp:4909:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    stream << f.read(byteRange.last() - byteRange.first());
data/okular-20.08.3/core/document.cpp:5202:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if (!equal)
data/okular-20.08.3/core/synctex/synctex_parser.c:568:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t size = strlen(output) + strlen(synctex_suffix) + strlen(synctex_suffix_gz) + 1;
data/okular-20.08.3/core/synctex/synctex_parser.c:568:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t size = strlen(output) + strlen(synctex_suffix) + strlen(synctex_suffix_gz) + 1;
data/okular-20.08.3/core/synctex/synctex_parser.c:568:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t size = strlen(output) + strlen(synctex_suffix) + strlen(synctex_suffix_gz) + 1;
data/okular-20.08.3/core/synctex/synctex_parser.c:585:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!strlen(open.synctex)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:686:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (build_directory && strlen(build_directory)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:693:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size = strlen(build_directory) + strlen(lpc) + 2; /*  One for the '/' and one for the '\0'.   */
data/okular-20.08.3/core/synctex/synctex_parser.c:693:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size = strlen(build_directory) + strlen(lpc) + 2; /*  One for the '/' and one for the '\0'.   */
data/okular-20.08.3/core/synctex/synctex_parser.c:696:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size += strlen(output);
data/okular-20.08.3/core/synctex/synctex_parser.c:710:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (!SYNCTEX_IS_PATH_SEPARATOR(build_output[strlen(build_directory) - 1])) {
data/okular-20.08.3/core/synctex/synctex_parser.c:711:41:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                    if (build_output != strcat(build_output, "/")) {
data/okular-20.08.3/core/synctex/synctex_parser.c:757:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (NULL == (reader->output = (char *)_synctex_malloc(strlen(output) + 1))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:3065:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (scanR->display_prompt + 1 < _synctex_display_prompt + strlen(_synctex_display_prompt)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:3751:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    remaining_len = strlen(the_string); /*  All the_string should match */
data/okular-20.08.3/core/synctex/synctex_parser.c:5727:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        scanner->display_prompt = (char *)_synctex_display_prompt + strlen(_synctex_display_prompt) - 1;
data/okular-20.08.3/core/synctex/synctex_parser.c:5975:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        (strlen(_synctex_data_name(input)) != strlen(_synctex_data_name(other_input)) || strncmp(_synctex_data_name(other_input), _synctex_data_name(input), strlen(_synctex_data_name(input))))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:5975:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        (strlen(_synctex_data_name(input)) != strlen(_synctex_data_name(other_input)) || strncmp(_synctex_data_name(other_input), _synctex_data_name(input), strlen(_synctex_data_name(input))))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:5975:174:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        (strlen(_synctex_data_name(input)) != strlen(_synctex_data_name(other_input)) || strncmp(_synctex_data_name(other_input), _synctex_data_name(input), strlen(_synctex_data_name(input))))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:5989:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t char_index = strlen(name);
data/okular-20.08.3/core/synctex/synctex_parser.c:6003:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                while ((strlen(relative) > 0) && (strlen(ptr) > 0) && (*relative == *ptr)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:6003:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                while ((strlen(relative) > 0) && (strlen(ptr) > 0) && (*relative == *ptr)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8167:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        } else if ((result = (int)strlen(buffer))) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8241:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (magnification && strlen(magnification)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8251:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (x_offset && strlen(x_offset)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8261:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (y_offset && strlen(y_offset)) {
data/okular-20.08.3/core/synctex/synctex_parser.c:8288:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *copy = _synctex_malloc(strlen(name) + 1);
data/okular-20.08.3/core/synctex/synctex_parser.c:8289:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    memcpy(copy, name, strlen(name) + 1);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:130:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        result = vsprintf(buff, reason, arg) + strlen(prompt);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:141:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        result = (int)strlen(buffer2);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:145:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        result = (int)strlen(prompt);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:302:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!strlen(name)) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:306:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(name) > 2) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:318:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const char *c = name + strlen(name);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:340:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(lpc)) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:341:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strchr(lpc, ' ') && lpc[0] != '"' && lpc[strlen(lpc) - 1] != '"') {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:346:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (strlen(src) < size) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:349:37:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                        if (dest != strncpy(dest, src, size)) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:355:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        memmove(dpc + 1, dpc, strlen(dpc) + 1); /*	Also move the null terminating character. */
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:357:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        dpc[strlen(dpc) + 1] = '\0'; /*	Consistency test */
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:358:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        dpc[strlen(dpc)] = '"';
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:386:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(temp);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:403:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if ((size = strlen(temp)) > 0) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:405:33:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    if (dest != strncpy(dest, temp, size)) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:437:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(base_name) > 0) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:462:34:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                if (core_name != strncpy(core_name, base_name, size)) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:476:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size = strlen(output) - strlen(base_name);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:476:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            size = strlen(output) - strlen(base_name);
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:484:33:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                if (dir_name != strncpy(dir_name, output, size)) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:500:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (dir_name && strlen(dir_name) > 0) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:502:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (quoted_core_name && strlen(quoted_core_name) > 0) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:507:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (quoted_core_name && strlen(quoted_core_name) > 0) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:511:82:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (!_synctex_path_is_absolute(output) && build_directory && (size = strlen(build_directory))) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:515:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    if (quoted_core_name && strlen(quoted_core_name) > 0) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:520:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    if (quoted_core_name && strlen(quoted_core_name) > 0) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:585:39:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (!feof(F) && 31 == fgetc(F) && !feof(F) && 139 == fgetc(F)) {
data/okular-20.08.3/core/synctex/synctex_parser_utils.c:585:70:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (!feof(F) && 31 == fgetc(F) && !feof(F) && 139 == fgetc(F)) {
data/okular-20.08.3/core/utils.cpp:132:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((read = from->read(buffer.data(), buffer.size())) > 0) {
data/okular-20.08.3/core/utils.cpp:133:49:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        written = to->write(buffer.constData(), read);
data/okular-20.08.3/core/utils.cpp:134:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read != written)
data/okular-20.08.3/generators/comicbook/document.cpp:210:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    const QImage i = reader.read();
data/okular-20.08.3/generators/comicbook/document.cpp:240:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return reader.read();
data/okular-20.08.3/generators/dvi/dviFile.cpp:136:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(job_id, (char *)command_pointer, magic_number);
data/okular-20.08.3/generators/dvi/dviFile.cpp:291:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    file.read((char *)dvi_Data(), size_of_file);
data/okular-20.08.3/generators/dvi/dviRenderer.cpp:398:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (f.read((char *)test, 2) < 2 || test[0] != 247 || test[1] != 2)
data/okular-20.08.3/generators/dvi/dviRenderer.cpp:408:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (f.read((char *)test, 4) < 4 || strncmp((char *)test, (char *)trailer, 4) != 0)
data/okular-20.08.3/generators/dvi/dviRenderer_draw.cpp:523:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(cmd, (char *)command_pointer, a);
data/okular-20.08.3/generators/dvi/dviRenderer_prescan.cpp:761:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(cmd, (char *)command_pointer, a);
data/okular-20.08.3/generators/dvi/special.cpp:284:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        QString tmp = strg.mid(index + strlen(argument_name));
data/okular-20.08.3/generators/dvi/util.cpp:105:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    x = (signed char)getc(fp);
data/okular-20.08.3/generators/dvi/util.cpp:107:24:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    x = (unsigned char)getc(fp);
data/okular-20.08.3/generators/dvi/xdvi.h:15:33:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define one(fp) ((unsigned char)getc(fp))
data/okular-20.08.3/generators/fax/faxdocument.cpp:103:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!file.seek(offset) || (size_t)file.read((char *)data, pn->length) != pn->length) {
data/okular-20.08.3/generators/kimgio/generator_kimgio.cpp:75:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!reader.read(&m_img)) {
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:103:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        linebuf[strlen(linebuf) - 1] = 0; /* strip newline */
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:104:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (linebuf[strlen(linebuf) - 1] == '\r')
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:105:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            linebuf[strlen(linebuf) - 1] = 0; /* strip carriage return */
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:109:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        linelen = strlen(linebuf);
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:143:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            for (str_end = linebuf + strlen(linebuf) - 1; str_end > linebuf && isspace(*str_end); str_end--)
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:145:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            charptr = (char *)malloc(strlen(str_begin) + (str_end - (linebuf + buf_index)) + 2);
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:147:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len2 = strlen(charptr);
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:149:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(charptr + len2 + 1, linebuf + buf_index, str_end - (linebuf + buf_index));
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:190:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            option_value = _plkr_strndup(ptr, strlen(ptr));
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:223:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    filename = (char *)malloc(strlen(dir) + strlen(name) + 2);
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:223:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    filename = (char *)malloc(strlen(dir) + strlen(name) + 2);
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:225:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strcpy(filename + strlen(filename), STRINGIFY(FILE_SEPARATOR_CHAR_S));
data/okular-20.08.3/generators/plucker/unpluck/config.cpp:226:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strcpy(filename + strlen(filename), name);
data/okular-20.08.3/generators/plucker/unpluck/qunpluck.cpp:372:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += strlen((char *)ptr);
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:275:67:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (!handle->seek(handle, record->offset) || (handle->read(handle, buf, record->size, record->size) != record->size)) {
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:325:67:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (!handle->seek(handle, record->offset) || (handle->read(handle, tbuffer, blen, size_needed) != size_needed)) {
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:362:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ptr += (strlen((char *)ptr) + 1);
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:492:92:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        for (ptr = record->cache + 8; (ptr - record->cache) < record->cached_size; ptr += (strlen((char *)ptr) + 1)) {
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:526:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!handle->seek(handle, 0) || (handle->read(handle, utilbuf, sizeof(utilbuf), 78) != 78)) {
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:547:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    newdoc->name = (char *)_plkr_strndup((char *)utilbuf, MIN(strlen((char *)utilbuf), 32));
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:557:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (handle->read(handle, utilbuf, sizeof(utilbuf), 8) != 8) {
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:566:70:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!handle->seek(handle, newdoc->records[0].offset) || (handle->read(handle, utilbuf, sizeof(utilbuf), 6) != 6)) {
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:594:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (handle->read(handle, utilbuf, sizeof(utilbuf), 4) != 4) {
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:607:63:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!handle->seek(handle, record->offset) || (handle->read(handle, utilbuf, sizeof(utilbuf), 8) != 8)) {
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:669:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            int owner_id_len = strlen(owner_id);
data/okular-20.08.3/generators/plucker/unpluck/unpluck.cpp:764:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    result = read(handle->dbprivate, buffer, MIN(buffersize, readsize));
data/okular-20.08.3/generators/plucker/unpluck/unpluck.h:40:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int (*read)(plkr_DBHandle handle, unsigned char *buffer, int buffersize, int readsize);
data/okular-20.08.3/generators/plucker/unpluck/util.cpp:88:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dup, str, len);
data/okular-20.08.3/generators/plucker/unpluck/util.cpp:134:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    crc = crc32(crc, (const Bytef *)str, strlen(str));
data/okular-20.08.3/generators/plucker/unpluck/util.cpp:199:66:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    slot->hs_entries[slot->hs_count].he_key = _plkr_strndup(key, strlen(key));
data/okular-20.08.3/generators/tiff/generator_tiff.cpp:38:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return device->isReadable() ? device->read(static_cast<char *>(buf), size) : -1;
data/okular-20.08.3/generators/xps/generator_xps.cpp:1531:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    image = reader.read();
data/okular-20.08.3/generators/xps/generator_xps.cpp:1538:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    reader.read(&image);
data/okular-20.08.3/part.cpp:163:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c = std::fgetc(m_handle);
data/okular-20.08.3/part.cpp:2670:29:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        const mode_t mask = umask(0);
data/okular-20.08.3/part.cpp:2671:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        umask(mask);
data/okular-20.08.3/part.cpp:3294:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((read = dev.read(buf, sizeof(buf))) > 0) {
data/okular-20.08.3/part.cpp:3295:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        wrtn = newtempfile->write(buf, read);
data/okular-20.08.3/part.cpp:3296:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read != wrtn)
data/okular-20.08.3/part.cpp:3299:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((read != 0) || (newtempfile->size() == 0)) {
data/okular-20.08.3/shell/okular_main.cpp:96:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                bytes = stdinFile.read(buf.data(), bufSize);

ANALYSIS SUMMARY:

Hits = 404
Lines analyzed = 127190 in approximately 3.17 seconds (40072 lines/second)
Physical Source Lines of Code (SLOC) = 87258
Hits@level = [0] 220 [1] 116 [2] 237 [3]   7 [4]  43 [5]   1
Hits@level+ = [0+] 624 [1+] 404 [2+] 288 [3+]  51 [4+]  44 [5+]   1
Hits/KSLOC@level+ = [0+] 7.15121 [1+] 4.62995 [2+] 3.30056 [3+] 0.584474 [4+] 0.504252 [5+] 0.0114603
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.