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/tesseract-4.1.1/src/training/dawg2wordlist.cpp
Examining data/tesseract-4.1.1/src/training/validate_grapheme.cpp
Examining data/tesseract-4.1.1/src/training/tessopt.h
Examining data/tesseract-4.1.1/src/training/lstmtraining.cpp
Examining data/tesseract-4.1.1/src/training/validate_grapheme.h
Examining data/tesseract-4.1.1/src/training/pango_font_info.cpp
Examining data/tesseract-4.1.1/src/training/unicharset_training_utils.cpp
Examining data/tesseract-4.1.1/src/training/combine_lang_model.cpp
Examining data/tesseract-4.1.1/src/training/shapeclustering.cpp
Examining data/tesseract-4.1.1/src/training/lstmeval.cpp
Examining data/tesseract-4.1.1/src/training/validate_javanese.h
Examining data/tesseract-4.1.1/src/training/ambiguous_words.cpp
Examining data/tesseract-4.1.1/src/training/icuerrorcode.h
Examining data/tesseract-4.1.1/src/training/lang_model_helpers.h
Examining data/tesseract-4.1.1/src/training/classifier_tester.cpp
Examining data/tesseract-4.1.1/src/training/degradeimage.h
Examining data/tesseract-4.1.1/src/training/validate_khmer.cpp
Examining data/tesseract-4.1.1/src/training/tlog.h
Examining data/tesseract-4.1.1/src/training/normstrngs.h
Examining data/tesseract-4.1.1/src/training/set_unicharset_properties.cpp
Examining data/tesseract-4.1.1/src/training/stringrenderer.cpp
Examining data/tesseract-4.1.1/src/training/errorcounter.h
Examining data/tesseract-4.1.1/src/training/mftraining.cpp
Examining data/tesseract-4.1.1/src/training/unicharset_training_utils.h
Examining data/tesseract-4.1.1/src/training/lstmtester.h
Examining data/tesseract-4.1.1/src/training/validator.h
Examining data/tesseract-4.1.1/src/training/mergenf.cpp
Examining data/tesseract-4.1.1/src/training/text2image.cpp
Examining data/tesseract-4.1.1/src/training/fileio.h
Examining data/tesseract-4.1.1/src/training/wordlist2dawg.cpp
Examining data/tesseract-4.1.1/src/training/combine_tessdata.cpp
Examining data/tesseract-4.1.1/src/training/validate_indic.h
Examining data/tesseract-4.1.1/src/training/validate_indic.cpp
Examining data/tesseract-4.1.1/src/training/pango_font_info.h
Examining data/tesseract-4.1.1/src/training/icuerrorcode.cpp
Examining data/tesseract-4.1.1/src/training/stringrenderer.h
Examining data/tesseract-4.1.1/src/training/lang_model_helpers.cpp
Examining data/tesseract-4.1.1/src/training/unicharset_extractor.cpp
Examining data/tesseract-4.1.1/src/training/degradeimage.cpp
Examining data/tesseract-4.1.1/src/training/tessopt.cpp
Examining data/tesseract-4.1.1/src/training/validate_myanmar.cpp
Examining data/tesseract-4.1.1/src/training/commontraining.h
Examining data/tesseract-4.1.1/src/training/ligature_table.cpp
Examining data/tesseract-4.1.1/src/training/validate_khmer.h
Examining data/tesseract-4.1.1/src/training/merge_unicharsets.cpp
Examining data/tesseract-4.1.1/src/training/mastertrainer.h
Examining data/tesseract-4.1.1/src/training/util.h
Examining data/tesseract-4.1.1/src/training/fileio.cpp
Examining data/tesseract-4.1.1/src/training/boxchar.h
Examining data/tesseract-4.1.1/src/training/validator.cpp
Examining data/tesseract-4.1.1/src/training/boxchar.cpp
Examining data/tesseract-4.1.1/src/training/commontraining.cpp
Examining data/tesseract-4.1.1/src/training/validate_javanese.cpp
Examining data/tesseract-4.1.1/src/training/ligature_table.h
Examining data/tesseract-4.1.1/src/training/commandlineflags.cpp
Examining data/tesseract-4.1.1/src/training/tlog.cpp
Examining data/tesseract-4.1.1/src/training/validate_myanmar.h
Examining data/tesseract-4.1.1/src/training/mergenf.h
Examining data/tesseract-4.1.1/src/training/mastertrainer.cpp
Examining data/tesseract-4.1.1/src/training/cntraining.cpp
Examining data/tesseract-4.1.1/src/training/errorcounter.cpp
Examining data/tesseract-4.1.1/src/training/normstrngs.cpp
Examining data/tesseract-4.1.1/src/training/lstmtester.cpp
Examining data/tesseract-4.1.1/src/training/commandlineflags.h
Examining data/tesseract-4.1.1/src/ccmain/paragraphs_internal.h
Examining data/tesseract-4.1.1/src/ccmain/pagesegmain.cpp
Examining data/tesseract-4.1.1/src/ccmain/reject.cpp
Examining data/tesseract-4.1.1/src/ccmain/mutableiterator.h
Examining data/tesseract-4.1.1/src/ccmain/resultiterator.h
Examining data/tesseract-4.1.1/src/ccmain/pgedit.h
Examining data/tesseract-4.1.1/src/ccmain/tessbox.cpp
Examining data/tesseract-4.1.1/src/ccmain/output.h
Examining data/tesseract-4.1.1/src/ccmain/thresholder.cpp
Examining data/tesseract-4.1.1/src/ccmain/docqual.h
Examining data/tesseract-4.1.1/src/ccmain/output.cpp
Examining data/tesseract-4.1.1/src/ccmain/pageiterator.cpp
Examining data/tesseract-4.1.1/src/ccmain/pageiterator.h
Examining data/tesseract-4.1.1/src/ccmain/tesseractclass.cpp
Examining data/tesseract-4.1.1/src/ccmain/paramsd.cpp
Examining data/tesseract-4.1.1/src/ccmain/paramsd.h
Examining data/tesseract-4.1.1/src/ccmain/resultiterator.cpp
Examining data/tesseract-4.1.1/src/ccmain/linerec.cpp
Examining data/tesseract-4.1.1/src/ccmain/ltrresultiterator.cpp
Examining data/tesseract-4.1.1/src/ccmain/equationdetect.h
Examining data/tesseract-4.1.1/src/ccmain/applybox.cpp
Examining data/tesseract-4.1.1/src/ccmain/pgedit.cpp
Examining data/tesseract-4.1.1/src/ccmain/werdit.cpp
Examining data/tesseract-4.1.1/src/ccmain/tessedit.cpp
Examining data/tesseract-4.1.1/src/ccmain/tesseractclass.h
Examining data/tesseract-4.1.1/src/ccmain/equationdetect.cpp
Examining data/tesseract-4.1.1/src/ccmain/paragraphs.h
Examining data/tesseract-4.1.1/src/ccmain/fixspace.cpp
Examining data/tesseract-4.1.1/src/ccmain/control.h
Examining data/tesseract-4.1.1/src/ccmain/tfacepp.cpp
Examining data/tesseract-4.1.1/src/ccmain/fixspace.h
Examining data/tesseract-4.1.1/src/ccmain/pagewalk.cpp
Examining data/tesseract-4.1.1/src/ccmain/osdetect.h
Examining data/tesseract-4.1.1/src/ccmain/reject.h
Examining data/tesseract-4.1.1/src/ccmain/control.cpp
Examining data/tesseract-4.1.1/src/ccmain/tessvars.h
Examining data/tesseract-4.1.1/src/ccmain/werdit.h
Examining data/tesseract-4.1.1/src/ccmain/docqual.cpp
Examining data/tesseract-4.1.1/src/ccmain/paragraphs.cpp
Examining data/tesseract-4.1.1/src/ccmain/superscript.cpp
Examining data/tesseract-4.1.1/src/ccmain/osdetect.cpp
Examining data/tesseract-4.1.1/src/ccmain/ltrresultiterator.h
Examining data/tesseract-4.1.1/src/ccmain/tessvars.cpp
Examining data/tesseract-4.1.1/src/ccmain/adaptions.cpp
Examining data/tesseract-4.1.1/src/ccmain/fixxht.cpp
Examining data/tesseract-4.1.1/src/ccmain/thresholder.h
Examining data/tesseract-4.1.1/src/ccmain/recogtraining.cpp
Examining data/tesseract-4.1.1/src/ccmain/mutableiterator.cpp
Examining data/tesseract-4.1.1/src/ccmain/par_control.cpp
Examining data/tesseract-4.1.1/src/dict/trie.cpp
Examining data/tesseract-4.1.1/src/dict/trie.h
Examining data/tesseract-4.1.1/src/dict/dawg.h
Examining data/tesseract-4.1.1/src/dict/hyphen.cpp
Examining data/tesseract-4.1.1/src/dict/stopper.h
Examining data/tesseract-4.1.1/src/dict/context.cpp
Examining data/tesseract-4.1.1/src/dict/dawg.cpp
Examining data/tesseract-4.1.1/src/dict/stopper.cpp
Examining data/tesseract-4.1.1/src/dict/permdawg.cpp
Examining data/tesseract-4.1.1/src/dict/dawg_cache.cpp
Examining data/tesseract-4.1.1/src/dict/dict.cpp
Examining data/tesseract-4.1.1/src/dict/matchdefs.h
Examining data/tesseract-4.1.1/src/dict/dawg_cache.h
Examining data/tesseract-4.1.1/src/dict/dict.h
Examining data/tesseract-4.1.1/src/wordrec/language_model.h
Examining data/tesseract-4.1.1/src/wordrec/outlines.cpp
Examining data/tesseract-4.1.1/src/wordrec/lm_consistency.cpp
Examining data/tesseract-4.1.1/src/wordrec/wordrec.cpp
Examining data/tesseract-4.1.1/src/wordrec/params_model.cpp
Examining data/tesseract-4.1.1/src/wordrec/language_model.cpp
Examining data/tesseract-4.1.1/src/wordrec/render.h
Examining data/tesseract-4.1.1/src/wordrec/params_model.h
Examining data/tesseract-4.1.1/src/wordrec/wordclass.cpp
Examining data/tesseract-4.1.1/src/wordrec/lm_state.cpp
Examining data/tesseract-4.1.1/src/wordrec/findseam.h
Examining data/tesseract-4.1.1/src/wordrec/lm_consistency.h
Examining data/tesseract-4.1.1/src/wordrec/render.cpp
Examining data/tesseract-4.1.1/src/wordrec/pieces.cpp
Examining data/tesseract-4.1.1/src/wordrec/plotedges.h
Examining data/tesseract-4.1.1/src/wordrec/findseam.cpp
Examining data/tesseract-4.1.1/src/wordrec/measure.h
Examining data/tesseract-4.1.1/src/wordrec/lm_pain_points.cpp
Examining data/tesseract-4.1.1/src/wordrec/chopper.cpp
Examining data/tesseract-4.1.1/src/wordrec/lm_state.h
Examining data/tesseract-4.1.1/src/wordrec/segsearch.cpp
Examining data/tesseract-4.1.1/src/wordrec/chop.h
Examining data/tesseract-4.1.1/src/wordrec/lm_pain_points.h
Examining data/tesseract-4.1.1/src/wordrec/tface.cpp
Examining data/tesseract-4.1.1/src/wordrec/chop.cpp
Examining data/tesseract-4.1.1/src/wordrec/drawfx.cpp
Examining data/tesseract-4.1.1/src/wordrec/plotedges.cpp
Examining data/tesseract-4.1.1/src/wordrec/wordrec.h
Examining data/tesseract-4.1.1/src/wordrec/drawfx.h
Examining data/tesseract-4.1.1/src/wordrec/associate.h
Examining data/tesseract-4.1.1/src/wordrec/outlines.h
Examining data/tesseract-4.1.1/src/wordrec/gradechop.cpp
Examining data/tesseract-4.1.1/src/wordrec/associate.cpp
Examining data/tesseract-4.1.1/src/cutil/emalloc.h
Examining data/tesseract-4.1.1/src/cutil/cutil_class.cpp
Examining data/tesseract-4.1.1/src/cutil/oldlist.h
Examining data/tesseract-4.1.1/src/cutil/oldlist.cpp
Examining data/tesseract-4.1.1/src/cutil/callcpp.cpp
Examining data/tesseract-4.1.1/src/cutil/cutil_class.h
Examining data/tesseract-4.1.1/src/cutil/callcpp.h
Examining data/tesseract-4.1.1/src/cutil/emalloc.cpp
Examining data/tesseract-4.1.1/src/cutil/bitvec.h
Examining data/tesseract-4.1.1/src/arch/simddetect.h
Examining data/tesseract-4.1.1/src/arch/intsimdmatrixavx2.cpp
Examining data/tesseract-4.1.1/src/arch/intsimdmatrix.h
Examining data/tesseract-4.1.1/src/arch/dotproduct.cpp
Examining data/tesseract-4.1.1/src/arch/dotproductsse.cpp
Examining data/tesseract-4.1.1/src/arch/intsimdmatrix.cpp
Examining data/tesseract-4.1.1/src/arch/simddetect.cpp
Examining data/tesseract-4.1.1/src/arch/intsimdmatrixsse.cpp
Examining data/tesseract-4.1.1/src/arch/dotproductavx.cpp
Examining data/tesseract-4.1.1/src/arch/dotproduct.h
Examining data/tesseract-4.1.1/src/arch/dotproductfma.cpp
Examining data/tesseract-4.1.1/src/api/hocrrenderer.cpp
Examining data/tesseract-4.1.1/src/api/wordstrboxrenderer.cpp
Examining data/tesseract-4.1.1/src/api/baseapi.h
Examining data/tesseract-4.1.1/src/api/capi.cpp
Examining data/tesseract-4.1.1/src/api/lstmboxrenderer.cpp
Examining data/tesseract-4.1.1/src/api/baseapi.cpp
Examining data/tesseract-4.1.1/src/api/altorenderer.cpp
Examining data/tesseract-4.1.1/src/api/renderer.h
Examining data/tesseract-4.1.1/src/api/renderer.cpp
Examining data/tesseract-4.1.1/src/api/pdfrenderer.cpp
Examining data/tesseract-4.1.1/src/api/capi.h
Examining data/tesseract-4.1.1/src/api/apitypes.h
Examining data/tesseract-4.1.1/src/api/tesseractmain.cpp
Examining data/tesseract-4.1.1/src/classify/intfeaturespace.cpp
Examining data/tesseract-4.1.1/src/classify/adaptmatch.cpp
Examining data/tesseract-4.1.1/src/classify/fpoint.h
Examining data/tesseract-4.1.1/src/classify/intfx.h
Examining data/tesseract-4.1.1/src/classify/tessclassifier.cpp
Examining data/tesseract-4.1.1/src/classify/mfoutline.h
Examining data/tesseract-4.1.1/src/classify/normmatch.h
Examining data/tesseract-4.1.1/src/classify/cluster.h
Examining data/tesseract-4.1.1/src/classify/blobclass.h
Examining data/tesseract-4.1.1/src/classify/protos.cpp
Examining data/tesseract-4.1.1/src/classify/mfx.h
Examining data/tesseract-4.1.1/src/classify/intfeaturemap.cpp
Examining data/tesseract-4.1.1/src/classify/intfx.cpp
Examining data/tesseract-4.1.1/src/classify/outfeat.cpp
Examining data/tesseract-4.1.1/src/classify/cluster.cpp
Examining data/tesseract-4.1.1/src/classify/picofeat.h
Examining data/tesseract-4.1.1/src/classify/intfeaturespace.h
Examining data/tesseract-4.1.1/src/classify/trainingsampleset.h
Examining data/tesseract-4.1.1/src/classify/adaptive.h
Examining data/tesseract-4.1.1/src/classify/mfdefs.cpp
Examining data/tesseract-4.1.1/src/classify/float2int.cpp
Examining data/tesseract-4.1.1/src/classify/normfeat.h
Examining data/tesseract-4.1.1/src/classify/intfeaturemap.h
Examining data/tesseract-4.1.1/src/classify/mfoutline.cpp
Examining data/tesseract-4.1.1/src/classify/tessclassifier.h
Examining data/tesseract-4.1.1/src/classify/blobclass.cpp
Examining data/tesseract-4.1.1/src/classify/outfeat.h
Examining data/tesseract-4.1.1/src/classify/float2int.h
Examining data/tesseract-4.1.1/src/classify/fpoint.cpp
Examining data/tesseract-4.1.1/src/classify/shapeclassifier.h
Examining data/tesseract-4.1.1/src/classify/trainingsample.cpp
Examining data/tesseract-4.1.1/src/classify/trainingsample.h
Examining data/tesseract-4.1.1/src/classify/kdtree.h
Examining data/tesseract-4.1.1/src/classify/picofeat.cpp
Examining data/tesseract-4.1.1/src/classify/sampleiterator.cpp
Examining data/tesseract-4.1.1/src/classify/protos.h
Examining data/tesseract-4.1.1/src/classify/mfdefs.h
Examining data/tesseract-4.1.1/src/classify/mfx.cpp
Examining data/tesseract-4.1.1/src/classify/shapetable.h
Examining data/tesseract-4.1.1/src/classify/cutoffs.cpp
Examining data/tesseract-4.1.1/src/classify/clusttool.h
Examining data/tesseract-4.1.1/src/classify/normmatch.cpp
Examining data/tesseract-4.1.1/src/classify/ocrfeatures.cpp
Examining data/tesseract-4.1.1/src/classify/mf.cpp
Examining data/tesseract-4.1.1/src/classify/kdtree.cpp
Examining data/tesseract-4.1.1/src/classify/shapeclassifier.cpp
Examining data/tesseract-4.1.1/src/classify/classify.h
Examining data/tesseract-4.1.1/src/classify/clusttool.cpp
Examining data/tesseract-4.1.1/src/classify/ocrfeatures.h
Examining data/tesseract-4.1.1/src/classify/intproto.cpp
Examining data/tesseract-4.1.1/src/classify/trainingsampleset.cpp
Examining data/tesseract-4.1.1/src/classify/featdefs.cpp
Examining data/tesseract-4.1.1/src/classify/mf.h
Examining data/tesseract-4.1.1/src/classify/intmatcher.cpp
Examining data/tesseract-4.1.1/src/classify/featdefs.h
Examining data/tesseract-4.1.1/src/classify/sampleiterator.h
Examining data/tesseract-4.1.1/src/classify/adaptive.cpp
Examining data/tesseract-4.1.1/src/classify/intmatcher.h
Examining data/tesseract-4.1.1/src/classify/normfeat.cpp
Examining data/tesseract-4.1.1/src/classify/intfeaturedist.cpp
Examining data/tesseract-4.1.1/src/classify/intproto.h
Examining data/tesseract-4.1.1/src/classify/classify.cpp
Examining data/tesseract-4.1.1/src/classify/intfeaturedist.h
Examining data/tesseract-4.1.1/src/classify/shapetable.cpp
Examining data/tesseract-4.1.1/src/lstm/reconfig.cpp
Examining data/tesseract-4.1.1/src/lstm/functions.cpp
Examining data/tesseract-4.1.1/src/lstm/lstmrecognizer.h
Examining data/tesseract-4.1.1/src/lstm/networkio.cpp
Examining data/tesseract-4.1.1/src/lstm/maxpool.cpp
Examining data/tesseract-4.1.1/src/lstm/convolve.cpp
Examining data/tesseract-4.1.1/src/lstm/networkio.h
Examining data/tesseract-4.1.1/src/lstm/functions.h
Examining data/tesseract-4.1.1/src/lstm/lstm.h
Examining data/tesseract-4.1.1/src/lstm/weightmatrix.cpp
Examining data/tesseract-4.1.1/src/lstm/tfnetwork.pb.cc
Examining data/tesseract-4.1.1/src/lstm/stridemap.h
Examining data/tesseract-4.1.1/src/lstm/lstmrecognizer.cpp
Examining data/tesseract-4.1.1/src/lstm/weightmatrix.h
Examining data/tesseract-4.1.1/src/lstm/reconfig.h
Examining data/tesseract-4.1.1/src/lstm/network.cpp
Examining data/tesseract-4.1.1/src/lstm/reversed.h
Examining data/tesseract-4.1.1/src/lstm/stridemap.cpp
Examining data/tesseract-4.1.1/src/lstm/networkbuilder.cpp
Examining data/tesseract-4.1.1/src/lstm/parallel.h
Examining data/tesseract-4.1.1/src/lstm/plumbing.cpp
Examining data/tesseract-4.1.1/src/lstm/plumbing.h
Examining data/tesseract-4.1.1/src/lstm/recodebeam.h
Examining data/tesseract-4.1.1/src/lstm/reversed.cpp
Examining data/tesseract-4.1.1/src/lstm/convolve.h
Examining data/tesseract-4.1.1/src/lstm/input.cpp
Examining data/tesseract-4.1.1/src/lstm/lstmtrainer.cpp
Examining data/tesseract-4.1.1/src/lstm/networkbuilder.h
Examining data/tesseract-4.1.1/src/lstm/series.cpp
Examining data/tesseract-4.1.1/src/lstm/networkscratch.h
Examining data/tesseract-4.1.1/src/lstm/static_shape.h
Examining data/tesseract-4.1.1/src/lstm/fullyconnected.h
Examining data/tesseract-4.1.1/src/lstm/lstm.cpp
Examining data/tesseract-4.1.1/src/lstm/tfnetwork.h
Examining data/tesseract-4.1.1/src/lstm/input.h
Examining data/tesseract-4.1.1/src/lstm/tfnetwork.pb.h
Examining data/tesseract-4.1.1/src/lstm/ctc.cpp
Examining data/tesseract-4.1.1/src/lstm/lstmtrainer.h
Examining data/tesseract-4.1.1/src/lstm/network.h
Examining data/tesseract-4.1.1/src/lstm/recodebeam.cpp
Examining data/tesseract-4.1.1/src/lstm/maxpool.h
Examining data/tesseract-4.1.1/src/lstm/tfnetwork.cpp
Examining data/tesseract-4.1.1/src/lstm/parallel.cpp
Examining data/tesseract-4.1.1/src/lstm/ctc.h
Examining data/tesseract-4.1.1/src/lstm/series.h
Examining data/tesseract-4.1.1/src/lstm/fullyconnected.cpp
Examining data/tesseract-4.1.1/src/textord/scanedg.h
Examining data/tesseract-4.1.1/src/textord/textlineprojection.cpp
Examining data/tesseract-4.1.1/src/textord/tospace.cpp
Examining data/tesseract-4.1.1/src/textord/gap_map.h
Examining data/tesseract-4.1.1/src/textord/colfind.cpp
Examining data/tesseract-4.1.1/src/textord/equationdetectbase.cpp
Examining data/tesseract-4.1.1/src/textord/strokewidth.cpp
Examining data/tesseract-4.1.1/src/textord/workingpartset.h
Examining data/tesseract-4.1.1/src/textord/pitsync1.h
Examining data/tesseract-4.1.1/src/textord/edgloop.cpp
Examining data/tesseract-4.1.1/src/textord/alignedblob.cpp
Examining data/tesseract-4.1.1/src/textord/ccnontextdetect.cpp
Examining data/tesseract-4.1.1/src/textord/cjkpitch.cpp
Examining data/tesseract-4.1.1/src/textord/tablerecog.cpp
Examining data/tesseract-4.1.1/src/textord/edgblob.h
Examining data/tesseract-4.1.1/src/textord/devanagari_processing.h
Examining data/tesseract-4.1.1/src/textord/colpartitiongrid.cpp
Examining data/tesseract-4.1.1/src/textord/blkocc.cpp
Examining data/tesseract-4.1.1/src/textord/textord.cpp
Examining data/tesseract-4.1.1/src/textord/sortflts.cpp
Examining data/tesseract-4.1.1/src/textord/textord.h
Examining data/tesseract-4.1.1/src/textord/wordseg.h
Examining data/tesseract-4.1.1/src/textord/colpartition.h
Examining data/tesseract-4.1.1/src/textord/tablerecog.h
Examining data/tesseract-4.1.1/src/textord/edgloop.h
Examining data/tesseract-4.1.1/src/textord/tablefind.h
Examining data/tesseract-4.1.1/src/textord/fpchop.h
Examining data/tesseract-4.1.1/src/textord/colpartitiongrid.h
Examining data/tesseract-4.1.1/src/textord/colfind.h
Examining data/tesseract-4.1.1/src/textord/edgblob.cpp
Examining data/tesseract-4.1.1/src/textord/tabvector.h
Examining data/tesseract-4.1.1/src/textord/tabfind.cpp
Examining data/tesseract-4.1.1/src/textord/linefind.h
Examining data/tesseract-4.1.1/src/textord/bbgrid.cpp
Examining data/tesseract-4.1.1/src/textord/imagefind.h
Examining data/tesseract-4.1.1/src/textord/equationdetectbase.h
Examining data/tesseract-4.1.1/src/textord/blkocc.h
Examining data/tesseract-4.1.1/src/textord/colpartitionset.h
Examining data/tesseract-4.1.1/src/textord/oldbasel.cpp
Examining data/tesseract-4.1.1/src/textord/topitch.h
Examining data/tesseract-4.1.1/src/textord/topitch.cpp
Examining data/tesseract-4.1.1/src/textord/pithsync.cpp
Examining data/tesseract-4.1.1/src/textord/tordmain.cpp
Examining data/tesseract-4.1.1/src/textord/sortflts.h
Examining data/tesseract-4.1.1/src/textord/tabfind.h
Examining data/tesseract-4.1.1/src/textord/makerow.h
Examining data/tesseract-4.1.1/src/textord/oldbasel.h
Examining data/tesseract-4.1.1/src/textord/blobgrid.cpp
Examining data/tesseract-4.1.1/src/textord/ccnontextdetect.h
Examining data/tesseract-4.1.1/src/textord/drawtord.h
Examining data/tesseract-4.1.1/src/textord/pitsync1.cpp
Examining data/tesseract-4.1.1/src/textord/textlineprojection.h
Examining data/tesseract-4.1.1/src/textord/makerow.cpp
Examining data/tesseract-4.1.1/src/textord/tovars.h
Examining data/tesseract-4.1.1/src/textord/blobgrid.h
Examining data/tesseract-4.1.1/src/textord/linefind.cpp
Examining data/tesseract-4.1.1/src/textord/drawtord.cpp
Examining data/tesseract-4.1.1/src/textord/underlin.cpp
Examining data/tesseract-4.1.1/src/textord/tabvector.cpp
Examining data/tesseract-4.1.1/src/textord/tordmain.h
Examining data/tesseract-4.1.1/src/textord/pithsync.h
Examining data/tesseract-4.1.1/src/textord/workingpartset.cpp
Examining data/tesseract-4.1.1/src/textord/gap_map.cpp
Examining data/tesseract-4.1.1/src/textord/fpchop.cpp
Examining data/tesseract-4.1.1/src/textord/alignedblob.h
Examining data/tesseract-4.1.1/src/textord/cjkpitch.h
Examining data/tesseract-4.1.1/src/textord/tablefind.cpp
Examining data/tesseract-4.1.1/src/textord/imagefind.cpp
Examining data/tesseract-4.1.1/src/textord/devanagari_processing.cpp
Examining data/tesseract-4.1.1/src/textord/baselinedetect.cpp
Examining data/tesseract-4.1.1/src/textord/tovars.cpp
Examining data/tesseract-4.1.1/src/textord/colpartitionset.cpp
Examining data/tesseract-4.1.1/src/textord/wordseg.cpp
Examining data/tesseract-4.1.1/src/textord/bbgrid.h
Examining data/tesseract-4.1.1/src/textord/baselinedetect.h
Examining data/tesseract-4.1.1/src/textord/strokewidth.h
Examining data/tesseract-4.1.1/src/textord/colpartition.cpp
Examining data/tesseract-4.1.1/src/textord/underlin.h
Examining data/tesseract-4.1.1/src/textord/scanedg.cpp
Examining data/tesseract-4.1.1/src/ccstruct/params_training_featdef.h
Examining data/tesseract-4.1.1/src/ccstruct/fontinfo.h
Examining data/tesseract-4.1.1/src/ccstruct/rejctmap.h
Examining data/tesseract-4.1.1/src/ccstruct/boxword.cpp
Examining data/tesseract-4.1.1/src/ccstruct/linlsq.h
Examining data/tesseract-4.1.1/src/ccstruct/crakedge.h
Examining data/tesseract-4.1.1/src/ccstruct/matrix.cpp
Examining data/tesseract-4.1.1/src/ccstruct/werd.cpp
Examining data/tesseract-4.1.1/src/ccstruct/ocrpara.cpp
Examining data/tesseract-4.1.1/src/ccstruct/seam.cpp
Examining data/tesseract-4.1.1/src/ccstruct/pdblock.cpp
Examining data/tesseract-4.1.1/src/ccstruct/blobbox.cpp
Examining data/tesseract-4.1.1/src/ccstruct/rejctmap.cpp
Examining data/tesseract-4.1.1/src/ccstruct/polyaprx.h
Examining data/tesseract-4.1.1/src/ccstruct/detlinefit.cpp
Examining data/tesseract-4.1.1/src/ccstruct/blread.cpp
Examining data/tesseract-4.1.1/src/ccstruct/rect.h
Examining data/tesseract-4.1.1/src/ccstruct/boxread.cpp
Examining data/tesseract-4.1.1/src/ccstruct/blobs.h
Examining data/tesseract-4.1.1/src/ccstruct/mod128.cpp
Examining data/tesseract-4.1.1/src/ccstruct/werd.h
Examining data/tesseract-4.1.1/src/ccstruct/normalis.cpp
Examining data/tesseract-4.1.1/src/ccstruct/stepblob.cpp
Examining data/tesseract-4.1.1/src/ccstruct/imagedata.h
Examining data/tesseract-4.1.1/src/ccstruct/pdblock.h
Examining data/tesseract-4.1.1/src/ccstruct/ocrrow.cpp
Examining data/tesseract-4.1.1/src/ccstruct/boxword.h
Examining data/tesseract-4.1.1/src/ccstruct/ocrrow.h
Examining data/tesseract-4.1.1/src/ccstruct/ocrblock.h
Examining data/tesseract-4.1.1/src/ccstruct/dppoint.cpp
Examining data/tesseract-4.1.1/src/ccstruct/quadratc.h
Examining data/tesseract-4.1.1/src/ccstruct/quadlsq.cpp
Examining data/tesseract-4.1.1/src/ccstruct/rect.cpp
Examining data/tesseract-4.1.1/src/ccstruct/imagedata.cpp
Examining data/tesseract-4.1.1/src/ccstruct/dppoint.h
Examining data/tesseract-4.1.1/src/ccstruct/publictypes.cpp
Examining data/tesseract-4.1.1/src/ccstruct/statistc.h
Examining data/tesseract-4.1.1/src/ccstruct/split.h
Examining data/tesseract-4.1.1/src/ccstruct/ratngs.cpp
Examining data/tesseract-4.1.1/src/ccstruct/points.h
Examining data/tesseract-4.1.1/src/ccstruct/seam.h
Examining data/tesseract-4.1.1/src/ccstruct/blread.h
Examining data/tesseract-4.1.1/src/ccstruct/quspline.h
Examining data/tesseract-4.1.1/src/ccstruct/params_training_featdef.cpp
Examining data/tesseract-4.1.1/src/ccstruct/boxread.h
Examining data/tesseract-4.1.1/src/ccstruct/pageres.h
Examining data/tesseract-4.1.1/src/ccstruct/split.cpp
Examining data/tesseract-4.1.1/src/ccstruct/ccstruct.cpp
Examining data/tesseract-4.1.1/src/ccstruct/polyblk.cpp
Examining data/tesseract-4.1.1/src/ccstruct/otsuthr.cpp
Examining data/tesseract-4.1.1/src/ccstruct/debugpixa.h
Examining data/tesseract-4.1.1/src/ccstruct/statistc.cpp
Examining data/tesseract-4.1.1/src/ccstruct/pageres.cpp
Examining data/tesseract-4.1.1/src/ccstruct/blamer.cpp
Examining data/tesseract-4.1.1/src/ccstruct/mod128.h
Examining data/tesseract-4.1.1/src/ccstruct/ocrblock.cpp
Examining data/tesseract-4.1.1/src/ccstruct/matrix.h
Examining data/tesseract-4.1.1/src/ccstruct/quspline.cpp
Examining data/tesseract-4.1.1/src/ccstruct/normalis.h
Examining data/tesseract-4.1.1/src/ccstruct/quadlsq.h
Examining data/tesseract-4.1.1/src/ccstruct/stepblob.h
Examining data/tesseract-4.1.1/src/ccstruct/blobbox.h
Examining data/tesseract-4.1.1/src/ccstruct/publictypes.h
Examining data/tesseract-4.1.1/src/ccstruct/coutln.cpp
Examining data/tesseract-4.1.1/src/ccstruct/blobs.cpp
Examining data/tesseract-4.1.1/src/ccstruct/detlinefit.h
Examining data/tesseract-4.1.1/src/ccstruct/blamer.h
Examining data/tesseract-4.1.1/src/ccstruct/polyblk.h
Examining data/tesseract-4.1.1/src/ccstruct/ccstruct.h
Examining data/tesseract-4.1.1/src/ccstruct/coutln.h
Examining data/tesseract-4.1.1/src/ccstruct/ratngs.h
Examining data/tesseract-4.1.1/src/ccstruct/ocrpara.h
Examining data/tesseract-4.1.1/src/ccstruct/linlsq.cpp
Examining data/tesseract-4.1.1/src/ccstruct/points.cpp
Examining data/tesseract-4.1.1/src/ccstruct/otsuthr.h
Examining data/tesseract-4.1.1/src/ccstruct/polyaprx.cpp
Examining data/tesseract-4.1.1/src/ccstruct/fontinfo.cpp
Examining data/tesseract-4.1.1/src/ccutil/ccutil.cpp
Examining data/tesseract-4.1.1/src/ccutil/genericvector.h
Examining data/tesseract-4.1.1/src/ccutil/params.cpp
Examining data/tesseract-4.1.1/src/ccutil/serialis.cpp
Examining data/tesseract-4.1.1/src/ccutil/errcode.h
Examining data/tesseract-4.1.1/src/ccutil/globaloc.h
Examining data/tesseract-4.1.1/src/ccutil/unichar.h
Examining data/tesseract-4.1.1/src/ccutil/ocrclass.h
Examining data/tesseract-4.1.1/src/ccutil/mainblk.cpp
Examining data/tesseract-4.1.1/src/ccutil/indexmapbidi.cpp
Examining data/tesseract-4.1.1/src/ccutil/serialis.h
Examining data/tesseract-4.1.1/src/ccutil/bitvector.h
Examining data/tesseract-4.1.1/src/ccutil/errcode.cpp
Examining data/tesseract-4.1.1/src/ccutil/platform.h
Examining data/tesseract-4.1.1/src/ccutil/ambigs.cpp
Examining data/tesseract-4.1.1/src/ccutil/unicharset.h
Examining data/tesseract-4.1.1/src/ccutil/scanutils.cpp
Examining data/tesseract-4.1.1/src/ccutil/helpers.h
Examining data/tesseract-4.1.1/src/ccutil/elst.cpp
Examining data/tesseract-4.1.1/src/ccutil/qrsequence.h
Examining data/tesseract-4.1.1/src/ccutil/sorthelper.h
Examining data/tesseract-4.1.1/src/ccutil/unicharset.cpp
Examining data/tesseract-4.1.1/src/ccutil/unichar.cpp
Examining data/tesseract-4.1.1/src/ccutil/params.h
Examining data/tesseract-4.1.1/src/ccutil/unicity_table.h
Examining data/tesseract-4.1.1/src/ccutil/host.h
Examining data/tesseract-4.1.1/src/ccutil/fileerr.h
Examining data/tesseract-4.1.1/src/ccutil/unicharcompress.h
Examining data/tesseract-4.1.1/src/ccutil/elst2.h
Examining data/tesseract-4.1.1/src/ccutil/ambigs.h
Examining data/tesseract-4.1.1/src/ccutil/indexmapbidi.h
Examining data/tesseract-4.1.1/src/ccutil/ccutil.h
Examining data/tesseract-4.1.1/src/ccutil/tprintf.h
Examining data/tesseract-4.1.1/src/ccutil/globaloc.cpp
Examining data/tesseract-4.1.1/src/ccutil/object_cache.h
Examining data/tesseract-4.1.1/src/ccutil/genericheap.h
Examining data/tesseract-4.1.1/src/ccutil/tesscallback.h
Examining data/tesseract-4.1.1/src/ccutil/unicodes.h
Examining data/tesseract-4.1.1/src/ccutil/bitvector.cpp
Examining data/tesseract-4.1.1/src/ccutil/doubleptr.h
Examining data/tesseract-4.1.1/src/ccutil/unicodes.cpp
Examining data/tesseract-4.1.1/src/ccutil/tessdatamanager.h
Examining data/tesseract-4.1.1/src/ccutil/strngs.h
Examining data/tesseract-4.1.1/src/ccutil/universalambigs.cpp
Examining data/tesseract-4.1.1/src/ccutil/bits16.h
Examining data/tesseract-4.1.1/src/ccutil/tessdatamanager.cpp
Examining data/tesseract-4.1.1/src/ccutil/unicharmap.h
Examining data/tesseract-4.1.1/src/ccutil/clst.h
Examining data/tesseract-4.1.1/src/ccutil/scanutils.h
Examining data/tesseract-4.1.1/src/ccutil/tprintf.cpp
Examining data/tesseract-4.1.1/src/ccutil/clst.cpp
Examining data/tesseract-4.1.1/src/ccutil/kdpair.h
Examining data/tesseract-4.1.1/src/ccutil/strngs.cpp
Examining data/tesseract-4.1.1/src/ccutil/elst.h
Examining data/tesseract-4.1.1/src/ccutil/lsterr.h
Examining data/tesseract-4.1.1/src/ccutil/elst2.cpp
Examining data/tesseract-4.1.1/src/ccutil/universalambigs.h
Examining data/tesseract-4.1.1/src/ccutil/unicharcompress.cpp
Examining data/tesseract-4.1.1/src/ccutil/unicharmap.cpp
Examining data/tesseract-4.1.1/src/vs2010/tesseract/resource.h
Examining data/tesseract-4.1.1/src/opencl/oclkernels.h
Examining data/tesseract-4.1.1/src/opencl/openclwrapper.cpp
Examining data/tesseract-4.1.1/src/opencl/openclwrapper.h
Examining data/tesseract-4.1.1/src/viewer/scrollview.h
Examining data/tesseract-4.1.1/src/viewer/svmnode.cpp
Examining data/tesseract-4.1.1/src/viewer/svutil.cpp
Examining data/tesseract-4.1.1/src/viewer/svpaint.cpp
Examining data/tesseract-4.1.1/src/viewer/svutil.h
Examining data/tesseract-4.1.1/src/viewer/svmnode.h
Examining data/tesseract-4.1.1/src/viewer/scrollview.cpp
Examining data/tesseract-4.1.1/sw.cpp
Examining data/tesseract-4.1.1/unittest/intfeaturemap_test.cc
Examining data/tesseract-4.1.1/unittest/ligature_table_test.cc
Examining data/tesseract-4.1.1/unittest/imagedata_test.cc
Examining data/tesseract-4.1.1/unittest/pango_font_info_test.cc
Examining data/tesseract-4.1.1/unittest/unicharset_test.cc
Examining data/tesseract-4.1.1/unittest/rect_test.cc
Examining data/tesseract-4.1.1/unittest/lstm_test.h
Examining data/tesseract-4.1.1/unittest/tablefind_test.cc
Examining data/tesseract-4.1.1/unittest/validator_test.cc
Examining data/tesseract-4.1.1/unittest/networkio_test.cc
Examining data/tesseract-4.1.1/unittest/denorm_test.cc
Examining data/tesseract-4.1.1/unittest/validate_indic_test.cc
Examining data/tesseract-4.1.1/unittest/validate_khmer_test.cc
Examining data/tesseract-4.1.1/unittest/nthitem_test.cc
Examining data/tesseract-4.1.1/unittest/tablerecog_test.cc
Examining data/tesseract-4.1.1/unittest/lstm_test.cc
Examining data/tesseract-4.1.1/unittest/shapetable_test.cc
Examining data/tesseract-4.1.1/unittest/matrix_test.cc
Examining data/tesseract-4.1.1/unittest/tabvector_test.cc
Examining data/tesseract-4.1.1/unittest/lstmtrainer_test.cc
Examining data/tesseract-4.1.1/unittest/applybox_test.cc
Examining data/tesseract-4.1.1/unittest/normstrngs_test.cc
Examining data/tesseract-4.1.1/unittest/equationdetect_test.cc
Examining data/tesseract-4.1.1/unittest/cycletimer.h
Examining data/tesseract-4.1.1/unittest/unichar_test.cc
Examining data/tesseract-4.1.1/unittest/pagesegmode_test.cc
Examining data/tesseract-4.1.1/unittest/commandlineflags_test.cc
Examining data/tesseract-4.1.1/unittest/intsimdmatrix_test.cc
Examining data/tesseract-4.1.1/unittest/lang_model_test.cc
Examining data/tesseract-4.1.1/unittest/lstm_squashed_test.cc
Examining data/tesseract-4.1.1/unittest/lstm_recode_test.cc
Examining data/tesseract-4.1.1/unittest/mastertrainer_test.cc
Examining data/tesseract-4.1.1/unittest/layout_test.cc
Examining data/tesseract-4.1.1/unittest/linlsq_test.cc
Examining data/tesseract-4.1.1/unittest/params_model_test.cc
Examining data/tesseract-4.1.1/unittest/stats_test.cc
Examining data/tesseract-4.1.1/unittest/osd_test.cc
Examining data/tesseract-4.1.1/unittest/progress_test.cc
Examining data/tesseract-4.1.1/unittest/include_gunit.h
Examining data/tesseract-4.1.1/unittest/loadlang_test.cc
Examining data/tesseract-4.1.1/unittest/dawg_test.cc
Examining data/tesseract-4.1.1/unittest/baseapi_thread_test.cc
Examining data/tesseract-4.1.1/unittest/fileio_test.cc
Examining data/tesseract-4.1.1/unittest/unicharcompress_test.cc
Examining data/tesseract-4.1.1/unittest/tatweel_test.cc
Examining data/tesseract-4.1.1/unittest/validate_grapheme_test.cc
Examining data/tesseract-4.1.1/unittest/fuzzers/fuzzer-api.cpp
Examining data/tesseract-4.1.1/unittest/log.h
Examining data/tesseract-4.1.1/unittest/tfile_test.cc
Examining data/tesseract-4.1.1/unittest/normstrngs_test.h
Examining data/tesseract-4.1.1/unittest/indexmapbidi_test.cc
Examining data/tesseract-4.1.1/unittest/stringrenderer_test.cc
Examining data/tesseract-4.1.1/unittest/colpartition_test.cc
Examining data/tesseract-4.1.1/unittest/scanutils_test.cc
Examining data/tesseract-4.1.1/unittest/textlineprojection_test.cc
Examining data/tesseract-4.1.1/unittest/recodebeam_test.cc
Examining data/tesseract-4.1.1/unittest/apiexample_test.cc
Examining data/tesseract-4.1.1/unittest/cleanapi_test.cc
Examining data/tesseract-4.1.1/unittest/qrsequence_test.cc
Examining data/tesseract-4.1.1/unittest/validate_myanmar_test.cc
Examining data/tesseract-4.1.1/unittest/bitvector_test.cc
Examining data/tesseract-4.1.1/unittest/resultiterator_test.cc
Examining data/tesseract-4.1.1/unittest/paragraphs_test.cc
Examining data/tesseract-4.1.1/unittest/baseapi_test.cc
Examining data/tesseract-4.1.1/unittest/stridemap_test.cc
Examining data/tesseract-4.1.1/unittest/heap_test.cc

FINAL RESULTS:

data/tesseract-4.1.1/src/api/altorenderer.cpp:241:3:  [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(result, text.c_str());
data/tesseract-4.1.1/src/api/baseapi.cpp:1485:3:  [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(ret, tsv_str.string());
data/tesseract-4.1.1/src/api/baseapi.cpp:1745:3:  [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(result, text.c_str());
data/tesseract-4.1.1/src/api/hocrrenderer.cpp:367:3:  [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(result, text.c_str());
data/tesseract-4.1.1/src/api/lstmboxrenderer.cpp:87:3:  [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(ret, lstm_box_str.string());
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:489:3:  [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(result, text.c_str());
data/tesseract-4.1.1/src/api/tesseractmain.cpp:57:3:  [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.
  vfprintf(stderr, fmt, ap);
data/tesseract-4.1.1/src/api/tesseractmain.cpp:67:3:  [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.
  vfprintf(stderr, fmt, ap);
data/tesseract-4.1.1/src/api/wordstrboxrenderer.cpp:84:3:  [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(ret, wordstr_box_str.string());
data/tesseract-4.1.1/src/ccmain/paramsd.cpp:332:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (msg_str, "Overwrite file " "%s" "? (Y/N)", filename);
data/tesseract-4.1.1/src/ccstruct/pdblock.cpp:202:5:  [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(temp_buff, sizeof(temp_buff), "%" PRId32, serial);
data/tesseract-4.1.1/src/ccstruct/polyblk.cpp:255:5:  [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(temp_buff, sizeof(temp_buff), "%" PRId32, num);
data/tesseract-4.1.1/src/ccutil/ambigs.cpp:310:5:  [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).
    strcat(replacement_string, token);
data/tesseract-4.1.1/src/ccutil/errcode.cpp:46:15:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    msgptr += sprintf (msgptr, "%s:", caller);
data/tesseract-4.1.1/src/ccutil/errcode.cpp:48:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  msgptr += sprintf (msgptr, "Error:%s", message);
data/tesseract-4.1.1/src/ccutil/errcode.cpp:59:15:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    msgptr += vsprintf (msgptr, format, args);
data/tesseract-4.1.1/src/ccutil/tprintf.cpp:63:5:  [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.
    vfprintf(debugfp, format, args);
data/tesseract-4.1.1/src/ccutil/tprintf.cpp:65:5:  [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.
    vfprintf(stderr, format, args);
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:1078:3:  [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(script_table[script_table_size_used], script);
data/tesseract-4.1.1/src/cutil/callcpp.cpp:39:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(msg, format, args);  //Format into msg
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:755:3:  [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(gpuEnv.mArrykernelNames[kCount - 1], kName);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:841:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(fileName, "%s-%s.bin", cl_name, deviceName);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:933:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(fileName, "%s-%s.bin", cl_name, deviceName);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:1070:3:  [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(gpuInfo->mArryKnelSrcFile[idx], filename);
data/tesseract-4.1.1/src/training/commontraining.cpp:366:3:  [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 (LabeledList->Label, Label);
data/tesseract-4.1.1/src/training/commontraining.cpp:412:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    sscanf(buffer, "%*s %s", unichar);
data/tesseract-4.1.1/src/training/commontraining.cpp:697:3:  [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 (MergeClass->Label, Label);
data/tesseract-4.1.1/src/training/errorcounter.cpp:449:3:  [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(formatted_str, max_str_len, format_str,
data/tesseract-4.1.1/src/training/stringrenderer.cpp:874:7:  [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(title, kMaxTitleLength, kTitleTemplate,
data/tesseract-4.1.1/src/viewer/scrollview.cpp:64:3:  [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(any->parameter, parameter);
data/tesseract-4.1.1/src/viewer/scrollview.cpp:114:7:  [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(cur->parameter, p);
data/tesseract-4.1.1/src/viewer/scrollview.cpp:398:3:  [4] (format) vsnprintf:
  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.
  vsnprintf(message, sizeof(message), format, args);
data/tesseract-4.1.1/src/viewer/scrollview.cpp:566:3:  [4] (format) vsnprintf:
  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.
  vsnprintf(message, sizeof(message), format, args);
data/tesseract-4.1.1/src/viewer/scrollview.cpp:739:3:  [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(p, ev->parameter);
data/tesseract-4.1.1/src/viewer/scrollview.cpp:822:3:  [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(message+pos, lastptr);
data/tesseract-4.1.1/src/viewer/svutil.cpp:159:5:  [4] (shell) execvp:
  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.
    execvp(executable, argv.get());
data/tesseract-4.1.1/src/viewer/svutil.cpp:311:3:  [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(&cmd[0], cmdlen, cmd_template, sv_path, sv_path);
data/tesseract-4.1.1/src/viewer/svutil.cpp:313:3:  [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(&cmd[0], cmdlen, cmd_template, sv_path);
data/tesseract-4.1.1/unittest/baseapi_test.cc:355:24:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    SCOPED_TRACE(absl::StrCat("Single instance test with lang = ", langs[i]));
data/tesseract-4.1.1/unittest/dawg_test.cc:59:12:  [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.
    return system(cmdline.c_str());
data/tesseract-4.1.1/unittest/imagedata_test.cc:60:34:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        FLAGS_test_tmpdir, absl::StrCat("documentdata", doc_id, ".lstmf"));
data/tesseract-4.1.1/unittest/lang_model_test.cc:66:47:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      file::JoinPath(output_dir, lang1, absl::StrCat(lang1, ".traineddata"));
data/tesseract-4.1.1/unittest/lang_model_test.cc:89:47:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      file::JoinPath(output_dir, lang2, absl::StrCat(lang2, ".traineddata"));
data/tesseract-4.1.1/unittest/lang_model_test.cc:157:47:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      file::JoinPath(output_dir, lang1, absl::StrCat(lang1, ".traineddata"));
data/tesseract-4.1.1/unittest/lang_model_test.cc:180:47:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      file::JoinPath(output_dir, lang2, absl::StrCat(lang2, ".traineddata"));
data/tesseract-4.1.1/unittest/lstm_test.h:91:11:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    absl::StrCat(kLang, ".traineddata")));
data/tesseract-4.1.1/unittest/normstrngs_test.h:36:16:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
  return absl::StrCat("\"", str, "\" ", CodepointList(str32));
data/tesseract-4.1.1/unittest/pagesegmode_test.cc:31:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  return access(filename, 0) == 0;
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:286:24:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    SCOPED_TRACE(absl::StrCat("Testing ", kExpectedFontNames[f]));
data/tesseract-4.1.1/unittest/paragraphs_test.cc:164:35:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        dbg_lines.push_back(absl::StrCat(
data/tesseract-4.1.1/unittest/paragraphs_test.cc:180:31:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
          annotation += absl::StrCat(
data/tesseract-4.1.1/unittest/paragraphs_test.cc:188:33:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      dbg_lines.push_back(absl::StrCat(correct[i].ascii, annotation));
data/tesseract-4.1.1/unittest/unicharcompress_test.cc:56:34:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
        FLAGS_test_tmpdir, absl::StrCat(unicharset_name, ".encoding.txt"));
data/tesseract-4.1.1/src/ccstruct/imagedata.cpp:510:9:  [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.
  TRand random;
data/tesseract-4.1.1/src/ccstruct/imagedata.cpp:513:3:  [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.
  random.set_seed(document_name_.string());
data/tesseract-4.1.1/src/ccstruct/imagedata.cpp:517:15:  [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.
    int src = random.IntRand() % num_pages;
data/tesseract-4.1.1/src/ccstruct/imagedata.cpp:518:16:  [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.
    int dest = random.IntRand() % num_pages;
data/tesseract-4.1.1/src/ccutil/genericvector.h:1180:3:  [3] (random) srand:
  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.
  srand(*seed);
data/tesseract-4.1.1/src/ccutil/mainblk.cpp:47:27:  [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 *tessdata_prefix = getenv("TESSDATA_PREFIX");
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:632:15:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  OpenclDll = LoadLibrary("openCL.dll");
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:1897:3:  [3] (random) srand:
  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.
  srand(1);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:2550:33:  [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* overrideDeviceStr = getenv("TESSERACT_OPENCL_DEVICE");
data/tesseract-4.1.1/src/training/degradeimage.cpp:188:5:  [3] (random) srand:
  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.
    srand(randomizer->IntRand());
data/tesseract-4.1.1/src/training/text2image.cpp:726:13:  [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.
  backend = getenv("PANGOCAIRO_BACKEND");
data/tesseract-4.1.1/src/viewer/svutil.cpp:171:39:  [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.
  snprintf(name, sizeof(name), "%ld", random());
data/tesseract-4.1.1/src/viewer/svutil.cpp:354:35:  [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.
    const char* scrollview_path = getenv("SCROLLVIEW_PATH");
data/tesseract-4.1.1/unittest/fuzzers/fuzzer-api.cpp:40:12:  [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.
  if (std::getenv("TESSDATA_PREFIX") == nullptr) {
data/tesseract-4.1.1/unittest/recodebeam_test.cc:229:11:  [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.
    TRand random;
data/tesseract-4.1.1/unittest/recodebeam_test.cc:232:25:  [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.
        outputs(t, i) = random.UnsignedRand(0.25);
data/tesseract-4.1.1/unittest/recodebeam_test.cc:261:73:  [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.
  int EncodeUTF8(const char* utf8_str, float score, int start_t, TRand* random,
data/tesseract-4.1.1/unittest/recodebeam_test.cc:279:13:  [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.
        if (random != nullptr &&
data/tesseract-4.1.1/unittest/recodebeam_test.cc:288:11:  [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.
      if (random != nullptr &&
data/tesseract-4.1.1/unittest/recodebeam_test.cc:307:59:  [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.
                                                   TRand* random) {
data/tesseract-4.1.1/unittest/recodebeam_test.cc:317:57:  [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.
      int end_t2 = EncodeUTF8(chars2[i], scores2[i], t, random, &outputs);
data/tesseract-4.1.1/unittest/recodebeam_test.cc:318:57:  [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.
      int end_t1 = EncodeUTF8(chars1[i], scores1[i], t, random, &outputs);
data/tesseract-4.1.1/unittest/recodebeam_test.cc:481:9:  [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.
  TRand random;
data/tesseract-4.1.1/unittest/recodebeam_test.cc:483:54:  [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.
      kViTops, kViTopScores, kVi2nds, kVi2ndScores, &random);
data/tesseract-4.1.1/src/api/altorenderer.cpp:137:7:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      MultiByteToWideChar(CP_ACP, 0, input_file_->string(), -1, nullptr, 0);
data/tesseract-4.1.1/src/api/altorenderer.cpp:139:15:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  str16_len = MultiByteToWideChar(CP_ACP, 0, input_file_->string(), -1,
data/tesseract-4.1.1/src/api/baseapi.cpp:249: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, &device.oclDeviceID, sizeof(cl_device_id));
data/tesseract-4.1.1/src/api/baseapi.cpp:986:3:  [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 pagename[MAX_PATH];
data/tesseract-4.1.1/src/api/baseapi.cpp:1058: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 page_str[kMaxIntSize];
data/tesseract-4.1.1/src/api/baseapi.cpp:1167: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).
    if (FILE* file = fopen(filename, "rb")) {
data/tesseract-4.1.1/src/api/baseapi.cpp:1281: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(kOldVarsFile, "wb");
data/tesseract-4.1.1/src/api/baseapi.cpp:2622:3:  [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(int_features, &cn_features[0], *num_features * sizeof(cn_features[0]));
data/tesseract-4.1.1/src/api/capi.cpp:235:14:  [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, "w");
data/tesseract-4.1.1/src/api/hocrrenderer.cpp:150:7:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      MultiByteToWideChar(CP_ACP, 0, input_file_->string(), -1, nullptr, 0);
data/tesseract-4.1.1/src/api/hocrrenderer.cpp:152:15:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  str16_len = MultiByteToWideChar(CP_ACP, 0, input_file_->string(), -1,
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:305:42:  [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 bool CodepointToUtf16be(int code, char utf16[kMaxBytesPerCodepoint]) {
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:459:9:  [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 utf16[kMaxBytesPerCodepoint];
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:626:14:  [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(stream.str().c_str(), "rb");
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:784:3:  [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(p, b1.str().c_str(), b1_len);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:786:3:  [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(p, colorspace.str().c_str(), colorspace_len);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:788:3:  [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(p, b2.str().c_str(), b2_len);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:790:3:  [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(p, cid->datacomp, cid->nbytescomp);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:792:3:  [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(p, b3, b3_len);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:909:3:  [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 utf16[kMaxBytesPerCodepoint];
data/tesseract-4.1.1/src/api/renderer.cpp:42:13:  [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).
    fout_ = fopen(outfile.string(), "wb");
data/tesseract-4.1.1/src/api/tesseractmain.cpp:111:7:  [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 info[256];
data/tesseract-4.1.1/src/api/tesseractmain.cpp:268:3:  [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 opt1[256], opt2[255];
data/tesseract-4.1.1/src/api/tesseractmain.cpp:372:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      *dpi = atoi(argv[i + 1]);
data/tesseract-4.1.1/src/api/tesseractmain.cpp:386:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      checkArgValues(atoi(argv[i+1]), "PSM", tesseract::PSM_COUNT);
data/tesseract-4.1.1/src/api/tesseractmain.cpp:387:58:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      *pagesegmode = static_cast<tesseract::PageSegMode>(atoi(argv[i + 1]));
data/tesseract-4.1.1/src/api/tesseractmain.cpp:391:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      int oem = atoi(argv[i + 1]);
data/tesseract-4.1.1/src/api/tesseractmain.cpp:682: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 dpi_string[255];
data/tesseract-4.1.1/src/ccmain/control.cpp:128:27:  [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* config_fp = fopen(backup_config_file_, "wb");
data/tesseract-4.1.1/src/ccmain/equationdetect.cpp:1459:3:  [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 page[50];
data/tesseract-4.1.1/src/ccmain/paragraphs.cpp:93:3:  [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 buffer[30];
data/tesseract-4.1.1/src/ccmain/paragraphs.cpp:497:3:  [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 s[30];
data/tesseract-4.1.1/src/ccmain/paramsd.cpp:159:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    iIt->set_value(atoi(val));
data/tesseract-4.1.1/src/ccmain/paramsd.cpp:161:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    bIt->set_value(atoi(val));
data/tesseract-4.1.1/src/ccmain/paramsd.cpp:328:3:  [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 msg_str[255];
data/tesseract-4.1.1/src/ccmain/paramsd.cpp:330:13:  [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 ((fp = fopen (filename, "rb")) != nullptr) {
data/tesseract-4.1.1/src/ccmain/paramsd.cpp:340:8:  [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).
  fp = fopen (filename, "wb");  // can we write to it?
data/tesseract-4.1.1/src/ccmain/pgedit.cpp:156:3:  [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 msg[kBufsize];
data/tesseract-4.1.1/src/ccmain/pgedit.cpp:159:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  msg_ptr += sprintf(msg_ptr, "Pt:(%0.3f, %0.3f) ", x, y);
data/tesseract-4.1.1/src/ccmain/pgedit.cpp:164:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      msg_ptr += sprintf(msg_ptr, "BL(x)=%0.3f ",
data/tesseract-4.1.1/src/ccmain/pgedit.cpp:169:18:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      msg_ptr += sprintf(msg_ptr, "Wd(%d, %d)/(%d, %d) ",
data/tesseract-4.1.1/src/ccmain/pgedit.cpp:179:22:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
          msg_ptr += sprintf(msg_ptr,
data/tesseract-4.1.1/src/ccmain/pgedit.cpp:419:3:  [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 msg[160];
data/tesseract-4.1.1/src/ccmain/pgedit.cpp:594:3:  [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 msg[80];
data/tesseract-4.1.1/src/ccmain/pgedit.cpp:651:11:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
          sprintf(msg, "Mode %d not yet implemented", mode);
data/tesseract-4.1.1/src/ccmain/recogtraining.cpp:49: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* output_file = fopen(output_fname.string(), "a+");
data/tesseract-4.1.1/src/ccmain/recogtraining.cpp:94:20:  [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* box_file = fopen(box_fname.string(), "r");
data/tesseract-4.1.1/src/ccmain/tessedit.cpp:54:13:  [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 ((fp = fopen(path.string(), "rb")) != nullptr) {
data/tesseract-4.1.1/src/ccmain/tessedit.cpp:60:15:  [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 ((fp = fopen(path.string(), "rb")) != nullptr) {
data/tesseract-4.1.1/src/ccmain/tessedit.cpp:147:25:  [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* params_file = fopen(tessedit_write_params_to_file.string(), "wb");
data/tesseract-4.1.1/src/ccstruct/blamer.h:162: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(lattice_data_, data, lattice_size_);
data/tesseract-4.1.1/src/ccstruct/blamer.h:222:7:  [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(lattice_data_, other.lattice_data_, other.lattice_size_);
data/tesseract-4.1.1/src/ccstruct/blobs.h:115: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(flags, src.flags, EDGEPTFLAGS * sizeof(flags[0]));
data/tesseract-4.1.1/src/ccstruct/blobs.h:191:3:  [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 flags[EDGEPTFLAGS];       // concavity, length etc
data/tesseract-4.1.1/src/ccstruct/blread.cpp:47:15:  [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 ((pdfp = fopen (name.string (), "rb")) == nullptr) {
data/tesseract-4.1.1/src/ccstruct/boxread.cpp:39:20:  [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 (!(box_file = fopen(filename.string(), "rb"))) {
data/tesseract-4.1.1/src/ccstruct/boxread.cpp:138:3:  [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 buff[kBoxReadBufSize];   // boxfile read buffer
data/tesseract-4.1.1/src/ccstruct/boxread.cpp:178:3:  [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 uch[kBoxReadBufSize];
data/tesseract-4.1.1/src/ccstruct/coutln.cpp:1023: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(offsets, source.offsets, stepcount * sizeof(*offsets));
data/tesseract-4.1.1/src/ccstruct/imagedata.cpp:144:3:  [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(&image_data->image_data_[0], imagedata, imagedatasize);
data/tesseract-4.1.1/src/ccstruct/imagedata.cpp:340:3:  [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(&(*image_data)[0], data, size);
data/tesseract-4.1.1/src/ccstruct/matrix.h:86:7:  [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(array_, src.array_, size * sizeof(array_[0]));
data/tesseract-4.1.1/src/ccstruct/matrix.h:449:11:  [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(dest, src + pos, sizeof(*dest) * move_size);
data/tesseract-4.1.1/src/ccstruct/ocrpara.cpp:94:3:  [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 buffer[200];
data/tesseract-4.1.1/src/ccstruct/pdblock.cpp:200: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 temp_buff[34];
data/tesseract-4.1.1/src/ccstruct/polyblk.cpp:253: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 temp_buff[34];
data/tesseract-4.1.1/src/ccstruct/ratngs.cpp:623: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(script_pos_, positions, sizeof(positions[0]) * length);
data/tesseract-4.1.1/src/ccstruct/rejctmap.cpp:323:3:  [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 buff[512];
data/tesseract-4.1.1/src/ccstruct/statistc.cpp:299:3:  [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(buckets_, result.buckets_, entrycount * sizeof(buckets_[0]));
data/tesseract-4.1.1/src/ccutil/ambigs.cpp:90:3:  [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 replacement_string[kMaxAmbigStringSize];
data/tesseract-4.1.1/src/ccutil/bitvector.cpp:120: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(array_, src.array_, ByteLength());
data/tesseract-4.1.1/src/ccutil/bitvector.cpp:129: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(array_, src.array_, ByteLength());
data/tesseract-4.1.1/src/ccutil/errcode.cpp:41:3:  [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 msg[MAX_MSG];
data/tesseract-4.1.1/src/ccutil/genericvector.h:215: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_new, data, sizeof(T) * current_size);
data/tesseract-4.1.1/src/ccutil/genericvector.h:377:14:  [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, "rb");
data/tesseract-4.1.1/src/ccutil/genericvector.h:403:14:  [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.string(), "wb");
data/tesseract-4.1.1/src/ccutil/mainblk.cpp:58: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 path[_MAX_PATH];
data/tesseract-4.1.1/src/ccutil/params.cpp:52:3:  [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 line[MAX_PATH];           // input line
data/tesseract-4.1.1/src/ccutil/params.cpp:143: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[128];
data/tesseract-4.1.1/src/ccutil/serialis.cpp:220:3:  [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_)[0], data, size);
data/tesseract-4.1.1/src/ccutil/serialis.cpp:286: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(buffer, &(*data_)[offset_], required_size);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:82:3:  [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(&new_header[1], GetCStr(), orig_header->used_);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:105:3:  [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(AllocData(1, kMinCapacity), "", 1);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:113:3:  [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(this_cstr, str.GetCStr(), str_used);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:120: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(AllocData(1, kMinCapacity), "", 1);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:124: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(this_cstr, cstr, len);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:132: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(AllocData(1, kMinCapacity), "", 1);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:135: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(this_cstr, data, length);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:248:3:  [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(this_cstr + index, str, len);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:258:3:  [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(this_cstr+index, this_cstr+index+len,
data/tesseract-4.1.1/src/ccutil/strngs.cpp:347:3:  [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(this_cstr, str.GetCStr(), str_used);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:366: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(this_cstr + this_used - 1, str_cstr, str_used);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:369: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(this_cstr, str_cstr, str_used);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:381:3:  [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 num_buffer[kMaxIntSize];
data/tesseract-4.1.1/src/ccutil/strngs.cpp:407: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(this_cstr, cstr, len);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:413: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(AllocData(1, kMinCapacity), "", 1);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:426:3:  [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(this_cstr, cstr, len);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:452:3:  [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(result_cstr, GetCStr(), this_used);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:475: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(this_cstr + this_used - 1, str, len);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:478: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(this_cstr, str, len);
data/tesseract-4.1.1/src/ccutil/tessdatamanager.cpp:149:3:  [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(&entries_[type][0], data, size);
data/tesseract-4.1.1/src/ccutil/tessdatamanager.cpp:241:3:  [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(&entries_[TESSDATA_VERSION][0], v_str.data(), v_str.size());
data/tesseract-4.1.1/src/ccutil/tessdatamanager.cpp:253: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.string(), "rb");
data/tesseract-4.1.1/src/ccutil/tprintf.cpp:54:15:  [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).
    debugfp = fopen(debug_file_name, "wb");
data/tesseract-4.1.1/src/ccutil/unichar.cpp:51:3:  [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(chars, utf8_str, total_len);
data/tesseract-4.1.1/src/ccutil/unichar.cpp:132:3:  [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(str, chars, len);
data/tesseract-4.1.1/src/ccutil/unichar.cpp:139:16:  [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 utf8_bytes[256] = {
data/tesseract-4.1.1/src/ccutil/unichar.h:171:3:  [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 chars[UNICHAR_LEN]{};
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:325: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 hex[sizeof(int) * 2 + 1];
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:329:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(hex, "%x", str[i]);
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:332:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(hex, "%x", ch.first_uni());
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:694:3:  [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 buffer[kFileBufSize + 1];
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:802:3:  [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 buffer[256];
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:811: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 unichar[256];
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:813: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 script[64];
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:834: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 normed[64];
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:1072: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(new_script_table, script_table,
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:1090:3:  [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 buffer[kMaxLen];
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:1111:3:  [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 unichar[UNICHAR_LEN + 1];
data/tesseract-4.1.1/src/ccutil/unicharset.h:133:3:  [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 unichar[UNICHAR_LEN + 1];
data/tesseract-4.1.1/src/ccutil/unicharset.h:351:18:  [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* file = fopen(filename, "w+b");
data/tesseract-4.1.1/src/ccutil/unicharset.h:389:18:  [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* file = fopen(filename, "rb");
data/tesseract-4.1.1/src/ccutil/unicharset.h:973: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 representation[UNICHAR_LEN + 1];
data/tesseract-4.1.1/src/classify/adaptmatch.cpp:466: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 (Filename.string(), "wb");
data/tesseract-4.1.1/src/classify/blobclass.cpp:101:14:  [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(tr_filename.string(), "wb");
data/tesseract-4.1.1/src/classify/clusttool.cpp:47:3:  [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 line[kMaxLineSize];
data/tesseract-4.1.1/src/classify/clusttool.cpp:124:3:  [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 line[kMaxLineSize];
data/tesseract-4.1.1/src/classify/clusttool.cpp:146: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 line[kMaxLineSize];
data/tesseract-4.1.1/src/classify/clusttool.cpp:177:3:  [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 sig_token[TOKENSIZE], shape_token[TOKENSIZE];
data/tesseract-4.1.1/src/classify/clusttool.cpp:183:3:  [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 line[kMaxLineSize];
data/tesseract-4.1.1/src/classify/cutoffs.cpp:53:3:  [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 line[kMaxLineSize];
data/tesseract-4.1.1/src/classify/featdefs.cpp:239:3:  [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 ShortName[FEAT_NAME_SIZE];
data/tesseract-4.1.1/src/classify/intproto.cpp:1268:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          *shape_id = atoi(ev->parameter);
data/tesseract-4.1.1/src/classify/normmatch.cpp:193:3:  [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 unichar[2 * UNICHAR_LEN + 1];
data/tesseract-4.1.1/src/classify/normmatch.cpp:211:3:  [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 line[kMaxLineSize];
data/tesseract-4.1.1/src/classify/trainingsample.cpp:134:3:  [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(sample->features_, features, num_features * sizeof(features[0]));
data/tesseract-4.1.1/src/classify/trainingsample.cpp:191: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(sample->features_, features_, num_features_ * sizeof(features_[0]));
data/tesseract-4.1.1/src/classify/trainingsample.cpp:196: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(sample->micro_features_, micro_features_,
data/tesseract-4.1.1/src/classify/trainingsample.cpp:199:3:  [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(sample->cn_feature_, cn_feature_, sizeof(*cn_feature_) * kNumCNParams);
data/tesseract-4.1.1/src/classify/trainingsample.cpp:200:3:  [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(sample->geo_feature_, geo_feature_, sizeof(*geo_feature_) * GeoCount);
data/tesseract-4.1.1/src/cutil/callcpp.cpp:36:3:  [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 msg[1000];
data/tesseract-4.1.1/src/dict/dawg.cpp:75:3:  [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       string [CHARS_PER_LINE];
data/tesseract-4.1.1/src/dict/dawg.cpp:79:15:  [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).
  word_file = fopen(filename, "r");
data/tesseract-4.1.1/src/dict/dict.cpp:690:27:  [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* doc_word_file = fopen(filename.string(), "a");
data/tesseract-4.1.1/src/dict/permdawg.cpp:118:15:  [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).
              fopen(output_ambig_words_file.string(), "wb+");
data/tesseract-4.1.1/src/dict/trie.cpp:293:3:  [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 line_str[CHARS_PER_LINE];
data/tesseract-4.1.1/src/dict/trie.cpp:296:15:  [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).
  word_file = fopen(filename, "rb");
data/tesseract-4.1.1/src/dict/trie.cpp:401:24:  [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 *pattern_file = fopen(filename, "rb");
data/tesseract-4.1.1/src/dict/trie.cpp:408:3:  [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 string[CHARS_PER_LINE];
data/tesseract-4.1.1/src/lstm/functions.h:170:3:  [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(dest, src, n * sizeof(dest[0]));
data/tesseract-4.1.1/src/lstm/lstmtrainer.cpp:1316: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(best_error_rates_, error_rates_, sizeof(error_rates_));
data/tesseract-4.1.1/src/lstm/lstmtrainer.cpp:1352:3:  [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(worst_error_rates_, error_rates_, sizeof(error_rates_));
data/tesseract-4.1.1/src/lstm/network.cpp:59:8:  [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 const* const kTypeNames[NT_COUNT] = {
data/tesseract-4.1.1/src/lstm/networkio.cpp:386: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(i_[dest_t], src.i_[src_t], i_.dim2() * sizeof(i_[0][0]));
data/tesseract-4.1.1/src/lstm/networkio.cpp:388: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(f_[dest_t], src.f_[src_t], f_.dim2() * sizeof(f_[0][0]));
data/tesseract-4.1.1/src/lstm/networkio.cpp:398: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(i_[dest_t] + dest_offset, src.i_[src_t] + src_offset,
data/tesseract-4.1.1/src/lstm/networkio.cpp:401: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(f_[dest_t] + dest_offset, src.f_[src_t] + src_offset,
data/tesseract-4.1.1/src/lstm/networkio.cpp:925:7:  [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(i_[t] + feature_offset, src.i_[t],
data/tesseract-4.1.1/src/lstm/networkio.cpp:933:7:  [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(f_[t] + feature_offset, src.f_[t],
data/tesseract-4.1.1/src/lstm/networkio.cpp:952:7:  [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(i_[t], src.i_[t] + feature_offset,
data/tesseract-4.1.1/src/lstm/networkio.cpp:957:7:  [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(f_[t], src.f_[t] + feature_offset,
data/tesseract-4.1.1/src/lstm/recodebeam.h:132: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(this, &src, sizeof(src));
data/tesseract-4.1.1/src/lstm/tfnetwork.cpp:47:3:  [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[0], proto_str.data(), proto_str.size());
data/tesseract-4.1.1/src/lstm/tfnetwork.cpp:79:3:  [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(eigen_tensor.data(), input.f(0),
data/tesseract-4.1.1/src/lstm/tfnetwork.cpp:119:3:  [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->f(0), eigen_output.data(),
data/tesseract-4.1.1/src/lstm/tfnetwork.pb.cc:198: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(&global_step_, &from.global_step_,
data/tesseract-4.1.1/src/lstm/weightmatrix.cpp:113: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(wf_[dest], src_data, ni * sizeof(*src_data));
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:194:7:  [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 buffer[DS_DEVICE_NAME_LENGTH];
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:204:7:  [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(profile->devices[next].oclDeviceName, buffer, length + 1);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:210:7:  [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(profile->devices[next].oclDriverVersion, buffer, length + 1);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:285:17:  [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* input = fopen(fileName, "rb");
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:395:7:  [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(&deviceType, deviceTypeStart, sizeof(ds_device_type));
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:494: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* profileFile = fopen(file, "wb");
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:578: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 invalidStr[4];
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:678: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(pixGetData(pixd), pValues, elements * sizeof(l_uint32));
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:716: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(srcdata, pixGetData(pixs), wpl * h * sizeof(l_uint32));
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:833:3:  [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 fileName[256] = {0}, cl_name[128] = {0};
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:834:3:  [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 deviceName[1024];
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:839:3:  [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(cl_name, clFileName, str - clFileName);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:843:8:  [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).
  fd = fopen(fileName, "rb");
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:866: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).
  output = fopen(fileName, "wb");
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:922: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 fileName[256] = {0}, cl_name[128] = {0};
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:925:7:  [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 deviceName[1024];
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:931:7:  [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(cl_name, clFileName, str - clFileName);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:1061:11:  [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).
    fd1 = fopen("kernel-build.log", "w+");
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:1911: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.
  unsigned char pixelWhite[4] = {0, 0, 0, 255};
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:1912: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.
  unsigned char pixelBlack[4] = {255, 255, 255, 255};
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:2394:3:  [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(*serializedScore, device->score, *serializedScoreSize);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:2404:3:  [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(device->score, serializedScore, serializedScoreSize);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:2552:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        int overrideDeviceIdx = atoi(overrideDeviceStr);
data/tesseract-4.1.1/src/opencl/openclwrapper.h:69:3:  [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 mckKernelName[150];
data/tesseract-4.1.1/src/opencl/openclwrapper.h:96:3:  [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 mArryKnelSrcFile[MAX_CLFILE_NUM]
data/tesseract-4.1.1/src/textord/colpartition.cpp:1736:3:  [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(part->special_blobs_densities_, special_blobs_densities_,
data/tesseract-4.1.1/src/textord/colpartition.cpp:1779:8:  [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 kBlobTypes[BRT_COUNT + 1] = "NHSRIUVT";
data/tesseract-4.1.1/src/textord/imagefind.cpp:517: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(color2, color1, 4);
data/tesseract-4.1.1/src/textord/tabvector.cpp:557:3:  [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 score_buf[64];
data/tesseract-4.1.1/src/training/ambiguous_words.cpp:63: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).
  FILE *input_file = fopen(input_file_str, "rb");
data/tesseract-4.1.1/src/training/ambiguous_words.cpp:68:3:  [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 str[CHARS_PER_LINE];
data/tesseract-4.1.1/src/training/boxchar.cpp:330:3:  [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 buffer[kMaxLineLength];
data/tesseract-4.1.1/src/training/cntraining.cpp:124:26:  [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 *TrainingPage = fopen(PageName, "rb");
data/tesseract-4.1.1/src/training/cntraining.cpp:210:10:  [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(Filename.string(), "wb");
data/tesseract-4.1.1/src/training/commontraining.cpp:182:14:  [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(shape_table_file.string(), "wb");
data/tesseract-4.1.1/src/training/commontraining.cpp:265:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(fontinfo_file_name + pagename_len - 2, "fontinfo");  // +"fontinfo"
data/tesseract-4.1.1/src/training/commontraining.cpp:281: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(FLAGS_output_trainer.c_str(), "wb");
data/tesseract-4.1.1/src/training/commontraining.cpp:393:3:  [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    buffer[2048];
data/tesseract-4.1.1/src/training/commontraining.cpp:394:3:  [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    unichar[UNICHAR_LEN + 1];
data/tesseract-4.1.1/src/training/dawg2wordlist.cpp:58:15:  [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 *out = fopen(outfile_name, "wb");
data/tesseract-4.1.1/src/training/fileio.cpp:43:10:  [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).
  return fopen(filename.c_str(), mode.c_str());
data/tesseract-4.1.1/src/training/fileio.cpp:48:18:  [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* stream = fopen(filename.c_str(), mode.c_str());
data/tesseract-4.1.1/src/training/fileio.cpp:58:18:  [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* stream = fopen(filename.c_str(), "wb");
data/tesseract-4.1.1/src/training/fileio.cpp:69:18:  [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* stream = fopen(filename.c_str(), "rb");
data/tesseract-4.1.1/src/training/fileio.cpp:153:3:  [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[BUFSIZ + 1];
data/tesseract-4.1.1/src/training/lang_model_helpers.cpp:117:3:  [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(&recoder_data[0], &encoding[0], encoding.length());
data/tesseract-4.1.1/src/training/ligature_table.cpp:115:3:  [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 tmp[5];
data/tesseract-4.1.1/src/training/ligature_table.cpp:134:3:  [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 tmp[5];
data/tesseract-4.1.1/src/training/lstmtraining.cpp:89:13:  [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(test_file.c_str(), "wb");
data/tesseract-4.1.1/src/training/mastertrainer.cpp:115:3:  [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 buffer[2048];
data/tesseract-4.1.1/src/training/mastertrainer.cpp:122:14:  [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(page_name, "rb");
data/tesseract-4.1.1/src/training/mastertrainer.cpp:334:14:  [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, "rb");
data/tesseract-4.1.1/src/training/mastertrainer.cpp:373:13:  [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(filename, "rb");
data/tesseract-4.1.1/src/training/mastertrainer.cpp:382:3:  [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 buffer[1024];
data/tesseract-4.1.1/src/training/mastertrainer.cpp:413:25:  [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* fontinfo_file = fopen(filename, "rb");
data/tesseract-4.1.1/src/training/mastertrainer.cpp:428:3:  [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 uch[UNICHAR_LEN];
data/tesseract-4.1.1/src/training/mastertrainer.cpp:429:3:  [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 kerned_uch[UNICHAR_LEN];
data/tesseract-4.1.1/src/training/mastertrainer.cpp:578:14:  [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(inttemp_file, "wb");
data/tesseract-4.1.1/src/training/mastertrainer.cpp:616:8:  [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).
  fp = fopen(pffmtable_file, "wb");
data/tesseract-4.1.1/src/training/mftraining.cpp:245:7:  [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 shape_label[kMaxShapeLabelLength + 1];
data/tesseract-4.1.1/src/training/pango_font_info.cpp:129:3:  [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 fonts_conf_template[MAX_FONTCONF_FILESIZE];
data/tesseract-4.1.1/src/training/pango_font_info.cpp:230:7:  [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 tmp[5];
data/tesseract-4.1.1/src/training/stringrenderer.cpp:83: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(reinterpret_cast<unsigned char*>(pix->data + i * pix->wpl) + 1,
data/tesseract-4.1.1/src/training/stringrenderer.cpp:873:7:  [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 title[kMaxTitleLength];
data/tesseract-4.1.1/src/training/text2image.cpp:315:3:  [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[kBufSize];
data/tesseract-4.1.1/src/training/text2image.cpp:410: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 filename[1024];
data/tesseract-4.1.1/src/training/text2image.cpp:491:3:  [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 font_desc_name[1024];
data/tesseract-4.1.1/src/training/text2image.cpp:667:9:  [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 tiff_name[1024];
data/tesseract-4.1.1/src/training/text2image.cpp:706: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.c_str(), "wb");
data/tesseract-4.1.1/src/viewer/scrollview.cpp:308:3:  [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 message[kMaxMsgSize];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:395:3:  [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 message[kMaxMsgSize - 4];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:401:3:  [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 form[kMaxMsgSize];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:497:7:  [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 coordpair[kMaxIntPairSize];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:563:3:  [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 message[kMaxMsgSize - 4];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:569:3:  [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 form[kMaxMsgSize];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:773:9:  [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.
  const char kBase64Table[64] = {
data/tesseract-4.1.1/src/viewer/svpaint.cpp:104:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  rgb[sv_event->command_id - 1] = atoi(sv_event->parameter);
data/tesseract-4.1.1/src/viewer/svutil.cpp:170:3:  [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 name[50];
data/tesseract-4.1.1/src/viewer/svutil.cpp:328:3:  [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 port_str[40];
data/tesseract-4.1.1/src/wordrec/findseam.cpp:109:3:  [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 str[80];
data/tesseract-4.1.1/src/wordrec/findseam.cpp:136:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf (str, "Full my_priority %0.0f,  ", my_priority);
data/tesseract-4.1.1/src/wordrec/language_model.cpp:966:9:  [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(modified_context, context, context_len);
data/tesseract-4.1.1/src/wordrec/params_model.cpp:104:3:  [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 line[kMaxLineSize];
data/tesseract-4.1.1/src/wordrec/params_model.cpp:146:14:  [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(full_path, "wb");
data/tesseract-4.1.1/unittest/bitvector_test.cc:123:14:  [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.c_str(), "wb");
data/tesseract-4.1.1/unittest/bitvector_test.cc:127:8:  [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).
  fp = fopen(filename.c_str(), "rb");
data/tesseract-4.1.1/unittest/fileio_test.cc:35:3:  [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 buffer[kMaxBufSize];
data/tesseract-4.1.1/unittest/fileio_test.cc:50:3:  [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 buffer[kMaxBufSize];
data/tesseract-4.1.1/unittest/indexmapbidi_test.cc:86:14:  [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.c_str(), "wb");
data/tesseract-4.1.1/unittest/indexmapbidi_test.cc:90:8:  [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).
  fp = fopen(filename.c_str(), "rb");
data/tesseract-4.1.1/unittest/scanutils_test.cc:30:15:  [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* fp1 = fopen(filename.c_str(), "r");
data/tesseract-4.1.1/unittest/scanutils_test.cc:35:15:  [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* fp2 = fopen(filename.c_str(), "r");
data/tesseract-4.1.1/unittest/scanutils_test.cc:72:3:  [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 s1[kStrLen];
data/tesseract-4.1.1/unittest/scanutils_test.cc:73:3:  [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 s2[kStrLen];
data/tesseract-4.1.1/unittest/shapetable_test.cc:79:14:  [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.c_str(), "wb");
data/tesseract-4.1.1/unittest/tfile_test.cc:154:3:  [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 buffer[kBufsize + 1];
data/tesseract-4.1.1/src/api/baseapi.cpp:143: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).
            size_t len = strlen(name);
data/tesseract-4.1.1/src/api/baseapi.cpp:168: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).
          size_t len = strlen(name);
data/tesseract-4.1.1/src/api/baseapi.cpp:1363:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(result, text.string(), text.length() + 1);
data/tesseract-4.1.1/src/api/baseapi.cpp:1546: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).
      output_length += strlen(result + output_length);
data/tesseract-4.1.1/src/api/baseapi.cpp:2487:27:  [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).
    length = (len == -1 ? strlen(repr) : len);
data/tesseract-4.1.1/src/api/baseapi.cpp:2489:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(unicode_repr, repr, length);
data/tesseract-4.1.1/src/api/baseapi.cpp:2537: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).
    int n = strlen(len);
data/tesseract-4.1.1/src/api/baseapi.cpp:2594:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(p, tc->unicode_repr, tc->length);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:194: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).
  AppendPDFObjectDIY(strlen(data));
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:569:14:  [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).
  objsize += strlen(endstream_endobj);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:658:14:  [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).
  objsize += strlen(endstream_endobj);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:776: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 b3_len = strlen(b3);
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:838:30:  [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 size_t pdftext_len = strlen(pdftext.get());
data/tesseract-4.1.1/src/api/pdfrenderer.cpp:859:14:  [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).
  objsize += strlen(b2);
data/tesseract-4.1.1/src/api/renderer.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).
  AppendData(s, strlen(s));
data/tesseract-4.1.1/src/api/tesseractmain.cpp:271:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(opt1, argv[i + 1], 255);
data/tesseract-4.1.1/src/api/tesseractmain.cpp:279:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(opt2, strchr(argv[i + 1], '=') + 1, sizeof(opt2) - 1);
data/tesseract-4.1.1/src/ccmain/applybox.cpp:539:27:  [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).
      next_space = utf8 + strlen(utf8);
data/tesseract-4.1.1/src/ccmain/control.cpp:1754:7:  [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 (lengths) > 20)
data/tesseract-4.1.1/src/ccmain/ltrresultiterator.cpp:78:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(result, text.string(), length);
data/tesseract-4.1.1/src/ccmain/ltrresultiterator.cpp:305:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(result, truth_text.string(), length);
data/tesseract-4.1.1/src/ccmain/ltrresultiterator.cpp:322:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(result, ocr_text.string(), length);
data/tesseract-4.1.1/src/ccmain/osdetect.cpp:513:11:  [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(prev_unichar) == 1)
data/tesseract-4.1.1/src/ccmain/paragraphs.cpp:2453: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).
  int trailing_ws_idx = strlen(text.get());  // strip trailing space
data/tesseract-4.1.1/src/ccmain/paramsd.cpp:102: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).
  int full_length = strlen(s);
data/tesseract-4.1.1/src/ccmain/paramsd.cpp:111:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(t, s, reqd_len);
data/tesseract-4.1.1/src/ccmain/reject.cpp:311:14:  [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).
  word_len = strlen(lengths);
data/tesseract-4.1.1/src/ccmain/resultiterator.cpp:604:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(result, text.string(), length);
data/tesseract-4.1.1/src/ccmain/tessedit.cpp:268:15:  [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 end = strlen(start);
data/tesseract-4.1.1/src/ccstruct/boxread.cpp:217:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(uch, buffptr + 1, kBoxReadBufSize - 1);
data/tesseract-4.1.1/src/ccstruct/boxread.cpp:220:15:  [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).
    uch_len = strlen(uch);
data/tesseract-4.1.1/src/ccstruct/fontinfo.cpp:164:18:  [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).
  int32_t size = strlen(fi.name);
data/tesseract-4.1.1/src/ccstruct/pageres.cpp:1011:27:  [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 (is_simple_quote(ch, strlen(ch)) &&
data/tesseract-4.1.1/src/ccstruct/pageres.cpp:1012: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).
      is_simple_quote(next_ch, strlen(next_ch)))
data/tesseract-4.1.1/src/ccstruct/pageres.cpp:1033:7:  [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(ch) == 1 && strlen(next_ch) == 1 &&
data/tesseract-4.1.1/src/ccstruct/pageres.cpp:1033: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 (strlen(ch) == 1 && strlen(next_ch) == 1 &&
data/tesseract-4.1.1/src/ccstruct/ratngs.cpp:254: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).
  int src_string_len = strlen(src_string);
data/tesseract-4.1.1/src/ccstruct/ratngs.cpp:258:30:  [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).
    this->init(src_lengths ? strlen(src_lengths): src_string_len);
data/tesseract-4.1.1/src/ccstruct/ratngs.cpp:461: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).
      *word_lengths_str += strlen(ch);
data/tesseract-4.1.1/src/ccutil/ambigs.cpp:98:15:  [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(buffer) > 0);
data/tesseract-4.1.1/src/ccutil/errcode.cpp:50:15:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
    msgptr += sprintf (msgptr, ":");
data/tesseract-4.1.1/src/ccutil/errcode.cpp:56:5:  [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.
    strcat (msg, "\n");
data/tesseract-4.1.1/src/ccutil/errcode.cpp:61:15:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
    msgptr += sprintf (msgptr, "\n");
data/tesseract-4.1.1/src/ccutil/errcode.cpp:67:15:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
    msgptr += sprintf (msgptr, "\n");
data/tesseract-4.1.1/src/ccutil/genericvector.h:177:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  bool read(tesseract::TFile* f,
data/tesseract-4.1.1/src/ccutil/genericvector.h:944:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool GenericVector<T>::read(
data/tesseract-4.1.1/src/ccutil/helpers.h:78: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).
  int last_index = static_cast<int>(strlen(str)) - 1;
data/tesseract-4.1.1/src/ccutil/helpers.h:87:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (fgetc(file) != '\n') {
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:68:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (isascii(p = fgetc(s)) && isspace(p));
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:101:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  for (c = fgetc(s); isascii(c) && isspace(c); c = fgetc(s));
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:101:52:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  for (c = fgetc(s); isascii(c) && isspace(c); c = fgetc(s));
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:106:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc(s);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:112:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(s);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:115:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc(s);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:122:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(s);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:123:37:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (c == 'x' || c == 'X') c = fgetc(s);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:128:60:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  for (; (c != EOF) && (d = DigitValue(c, base)) >= 0; c = fgetc(s))
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:142:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  for (c = fgetc(s); isascii(c) && isspace(c); c = fgetc(s));
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:142:52:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  for (c = fgetc(s); isascii(c) && isspace(c); c = fgetc(s));
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:147:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc(s);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:151:56:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  for (; c != EOF && (d = DigitValue(c, 10)) >= 0; c = fgetc(s))
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:154:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (c = fgetc(s); c != EOF && (d = DigitValue(c, 10)) >= 0; c = fgetc(s)) {
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:154:70:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (c = fgetc(s); c != EOF && (d = DigitValue(c, 10)) >= 0; c = fgetc(s)) {
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:161:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc(s);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:165:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(s);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:168:60:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (; (c != EOF) && (d = DigitValue(c, 10)) >= 0; c = fgetc(s)) {
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:231:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          if (fgetc(stream) != ch)
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:389:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if ((q = fgetc(stream)) <= 0) {
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:407:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                q = fgetc(stream);
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:434:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              if (fgetc(stream) != '%')
data/tesseract-4.1.1/src/ccutil/scanutils.cpp:480:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          q = fgetc(stream);
data/tesseract-4.1.1/src/ccutil/strngs.cpp:99: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).
    header->used_ = strlen(GetCStr()) + 1;
data/tesseract-4.1.1/src/ccutil/strngs.cpp:122: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).
    const int len = strlen(cstr) + 1;
data/tesseract-4.1.1/src/ccutil/strngs.cpp:332: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 int32_t length = strlen(cstr) + 1;
data/tesseract-4.1.1/src/ccutil/strngs.cpp:402: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).
    const int len = strlen(cstr) + 1;
data/tesseract-4.1.1/src/ccutil/strngs.cpp:467: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).
  const int len = strlen(str) + 1;
data/tesseract-4.1.1/src/ccutil/strngs.h:82:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    return strncpy(new char[len], GetCStr(), len);
data/tesseract-4.1.1/src/ccutil/strngs.h:171: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).
               : (GetHeader()->used_ == (strlen(string()) + 1));
data/tesseract-4.1.1/src/ccutil/unichar.cpp:186:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(utf8_output, it_, len);
data/tesseract-4.1.1/src/ccutil/unichar.cpp:216:27:  [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 int utf8_length = strlen(utf8_str);
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:267: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).
  int str_length = strlen(str);
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:815:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(script, null_script, sizeof(script) - 1);
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:1077: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).
  script_table[script_table_size_used] = new char[strlen(script) + 1];
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:1099: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).
  int len = strlen(string);
data/tesseract-4.1.1/src/ccutil/unicharset.cpp:1112:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(unichar, ptr, step);
data/tesseract-4.1.1/src/ccutil/unicharset.h:65:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(this->unichar, uch, sizeof(this->unichar));
data/tesseract-4.1.1/src/ccutil/unicharset.h:247: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).
    return CleanupString(utf8_str, strlen(utf8_str));
data/tesseract-4.1.1/src/ccutil/unicity_table.h:89:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  bool read(tesseract::TFile* f,
data/tesseract-4.1.1/src/ccutil/unicity_table.h:196:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool UnicityTable<T>::read(
data/tesseract-4.1.1/src/ccutil/unicity_table.h:198:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return table_.read(f, cb);
data/tesseract-4.1.1/src/classify/intproto.cpp:936:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    this->fontinfo_table_.read(fp, NewPermanentTessCallback(read_info));
data/tesseract-4.1.1/src/classify/intproto.cpp:938:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      this->fontinfo_table_.read(fp,
data/tesseract-4.1.1/src/classify/intproto.cpp:941:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    this->fontset_table_.read(fp, NewPermanentTessCallback(read_set));
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:202: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).
      length = strlen(buffer);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:208: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).
      length = strlen(buffer);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:264:18:  [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).
  stringLength = strlen(string);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:336:18:  [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).
    dataStart += strlen(DS_TAG_VERSION);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:344: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).
    size_t versionStringLength = strlen(profile->version);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:351:33:  [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).
    currentPosition = dataEnd + strlen(DS_TAG_VERSION_END);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:375: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).
      dataStart += strlen(DS_TAG_DEVICE);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:388: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).
      deviceTypeStart += strlen(DS_TAG_DEVICE_TYPE);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:404: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).
        deviceNameStart += strlen(DS_TAG_DEVICE_NAME);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:418:30:  [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).
        deviceDriverStart += strlen(DS_TAG_DEVICE_DRIVER_VERSION);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:432: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).
            actualDeviceNameLength = strlen(profile->devices[i].oclDeviceName);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:433: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).
            driverVersionLength = strlen(profile->devices[i].oclDriverVersion);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:442: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).
              deviceScoreStart += strlen(DS_TAG_SCORE);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:462:33:  [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).
            deviceScoreStart += strlen(DS_TAG_SCORE);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:476: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).
      currentPosition = dataEnd + strlen(DS_TAG_DEVICE_END);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:501: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).
    fwrite(DS_TAG_VERSION, sizeof(char), strlen(DS_TAG_VERSION), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:502:44:  [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).
    fwrite(profile->version, sizeof(char), strlen(profile->version),
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:504:46:  [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).
    fwrite(DS_TAG_VERSION_END, sizeof(char), strlen(DS_TAG_VERSION_END),
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:512:43:  [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).
      fwrite(DS_TAG_DEVICE, sizeof(char), strlen(DS_TAG_DEVICE), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:514: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).
      fwrite(DS_TAG_DEVICE_TYPE, sizeof(char), strlen(DS_TAG_DEVICE_TYPE),
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:518:14:  [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(DS_TAG_DEVICE_TYPE_END), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:533:52:  [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).
          fwrite(DS_TAG_DEVICE_NAME, sizeof(char), strlen(DS_TAG_DEVICE_NAME),
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:536:18:  [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(profile->devices[i].oclDeviceName), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:538:18:  [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(DS_TAG_DEVICE_NAME_END), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:541:18:  [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(DS_TAG_DEVICE_DRIVER_VERSION), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:543:18:  [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(profile->devices[i].oclDriverVersion), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:545:18:  [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(DS_TAG_DEVICE_DRIVER_VERSION_END), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:552: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).
      fwrite(DS_TAG_SCORE, sizeof(char), strlen(DS_TAG_SCORE), profileFile);
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:560:46:  [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).
      fwrite(DS_TAG_SCORE_END, sizeof(char), strlen(DS_TAG_SCORE_END),
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:562: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).
      fwrite(DS_TAG_DEVICE_END, sizeof(char), strlen(DS_TAG_DEVICE_END),
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:577: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).
  for (unsigned i = 0; i < strlen(invalidChars); i++) {
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:754:15:  [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).
  ASSERT_HOST(strlen(kName) < sizeof(gpuEnv.mArrykernelNames[kCount - 1]));
data/tesseract-4.1.1/src/opencl/openclwrapper.cpp:968: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).
  source_size[0] = strlen(source);
data/tesseract-4.1.1/src/textord/devanagari_processing.cpp:443:10:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
  while (ulimit > 0 && hist_horiz.hist()[ulimit] >= thresh)
data/tesseract-4.1.1/src/textord/devanagari_processing.cpp:443:42:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
  while (ulimit > 0 && hist_horiz.hist()[ulimit] >= thresh)
data/tesseract-4.1.1/src/textord/devanagari_processing.cpp:444:7:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
    --ulimit;
data/tesseract-4.1.1/src/textord/devanagari_processing.cpp:448:41:  [1] (obsolete) ulimit:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name, which is NOT obsolete) (CWE-676). Use getrlimit(2),
  setrlimit(2), and sysconf(3) instead.
  if (shirorekha_top) *shirorekha_top = ulimit;
data/tesseract-4.1.1/src/training/combine_tessdata.cpp:80:27:  [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* last = &argv[1][strlen(argv[1])-1];
data/tesseract-4.1.1/src/training/combine_tessdata.cpp:117: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).
        char* last = &argv[3][strlen(argv[3])-1];
data/tesseract-4.1.1/src/training/commandlineflags.cpp:127: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).
  const int kFlagNamePrefixLen = strlen(kFlagNamePrefix);
data/tesseract-4.1.1/src/training/commandlineflags.cpp:223:14:  [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(rhs)) {
data/tesseract-4.1.1/src/training/commandlineflags.cpp:255:14:  [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(rhs)) {
data/tesseract-4.1.1/src/training/commandlineflags.cpp:291:14:  [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(rhs)) {
data/tesseract-4.1.1/src/training/commontraining.cpp:262: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).
    int pagename_len = strlen(page_name);
data/tesseract-4.1.1/src/training/commontraining.cpp:264:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(fontinfo_file_name, page_name, pagename_len - 2);   // remove "tr"
data/tesseract-4.1.1/src/training/commontraining.cpp:365:52:  [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).
  LabeledList->Label = static_cast<char*>(Emalloc (strlen (Label)+1));
data/tesseract-4.1.1/src/training/commontraining.cpp:696: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).
  MergeClass->Label = static_cast<char*>(Emalloc (strlen (Label)+1));
data/tesseract-4.1.1/src/training/errorcounter.cpp:447:30:  [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 size_t max_str_len = strlen(format_str) + kMaxExtraLength * (CT_SIZE - 1) + 1;
data/tesseract-4.1.1/src/training/ligature_table.cpp:99: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).
      int norm_length = strlen(UNICHARSET::kCustomLigatures[i][0]);
data/tesseract-4.1.1/src/training/mastertrainer.cpp:484: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).
      int len = strlen(fontinfo_table_.get(f).name);
data/tesseract-4.1.1/src/training/mftraining.cpp:288:12:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (getchar() != '\n');
data/tesseract-4.1.1/src/training/normstrngs.cpp:230: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).
  return SpanUTF8Whitespace(text) == strlen(text);
data/tesseract-4.1.1/src/training/normstrngs.cpp:235: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).
  for (UNICHAR::const_iterator it = UNICHAR::begin(text, strlen(text));
data/tesseract-4.1.1/src/training/normstrngs.cpp:236:33:  [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).
       it != UNICHAR::end(text, strlen(text)); ++it) {
data/tesseract-4.1.1/src/training/normstrngs.cpp:245: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).
  for (UNICHAR::const_iterator it = UNICHAR::begin(text, strlen(text));
data/tesseract-4.1.1/src/training/normstrngs.cpp:246:33:  [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).
       it != UNICHAR::end(text, strlen(text)); ++it) {
data/tesseract-4.1.1/src/training/pango_font_info.cpp:408: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).
    pango_shape(s, strlen(s), &(run->item->analysis), glyphs);
data/tesseract-4.1.1/src/training/pango_font_info.cpp:528:8:  [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 && best_match != nullptr) {
data/tesseract-4.1.1/src/training/pango_font_info.cpp:542:8:  [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/tesseract-4.1.1/src/training/pango_font_info.cpp:545: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.
  return equal;
data/tesseract-4.1.1/src/training/stringrenderer.cpp:471: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).
  cluster_start_indices.push_back(strlen(text));
data/tesseract-4.1.1/src/training/stringrenderer.cpp:841:46:  [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 (!FontUtils::SelectFont(kTitleTemplate, strlen(kTitleTemplate),
data/tesseract-4.1.1/src/training/stringrenderer.cpp:889: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).
      RenderToBinaryImage(title, strlen(title), 128, &title_image);
data/tesseract-4.1.1/src/training/text2image.cpp:251:46:  [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).
        render->RenderToImage(text + offset, strlen(text + offset), nullptr);
data/tesseract-4.1.1/src/training/text2image.cpp:626: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).
         offset < strlen(to_render_utf8) &&
data/tesseract-4.1.1/src/training/text2image.cpp:634: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).
                                               strlen(to_render_utf8 + offset),
data/tesseract-4.1.1/src/training/text2image.cpp:638: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).
                                       strlen(to_render_utf8 + offset), &pix);
data/tesseract-4.1.1/src/viewer/scrollview.cpp:63: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).
  any->parameter = new char[strlen(parameter) + 1];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:113:33:  [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).
      cur->parameter = new char[strlen(p) + 1];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:115:11:  [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(p) > 0) {  // remove the last \n
data/tesseract-4.1.1/src/viewer/scrollview.cpp:116: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).
        cur->parameter[strlen(p)] = '\0';
data/tesseract-4.1.1/src/viewer/scrollview.cpp:738: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).
  char* p = new char[strlen(ev->parameter) + 1];
data/tesseract-4.1.1/src/viewer/scrollview.cpp:815:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(message+pos, lastptr, nextptr-lastptr);
data/tesseract-4.1.1/src/wordrec/language_model.cpp:945:43:  [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 *unichar_end = unichar_ptr + strlen(unichar_ptr);
data/tesseract-4.1.1/src/wordrec/language_model.cpp:963:30:  [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 context_len = strlen(context);
data/tesseract-4.1.1/src/wordrec/language_model.cpp:965: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).
          new char[context_len + strlen(unichar_ptr) + step + 1];
data/tesseract-4.1.1/src/wordrec/language_model.cpp:970:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(modified_context_end, unichar_ptr - step, step);
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:110:52:  [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).
  EXPECT_TRUE(font_info_.CanRenderString(kEngText, strlen(kEngText)));
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:113:52:  [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).
  EXPECT_TRUE(font_info_.CanRenderString(kKorText, strlen(kKorText)));
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:116:52:  [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).
  EXPECT_TRUE(font_info_.CanRenderString(kHinText, strlen(kHinText)));
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:123: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).
      font_info_.CanRenderString(kArabicLigature, strlen(kArabicLigature)));
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:126:55:  [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).
  EXPECT_TRUE(font_info_.CanRenderString(kArabicText, strlen(kArabicText)));
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:131:53:  [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).
  EXPECT_FALSE(font_info_.CanRenderString(kKorText, strlen(kKorText)));
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:138: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).
                                            strlen(kBadlyFormedHinWords[i])))
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:178: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).
    ut.PointToUTF8(utf8_text, strlen(utf8_text));
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:243:53:  [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).
    EXPECT_TRUE(FontUtils::SelectFont(kLangText[i], strlen(kLangText[i]),
data/tesseract-4.1.1/unittest/pango_font_info_test.cc:254:56:  [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).
  EXPECT_FALSE(FontUtils::SelectFont(kMixedScriptText, strlen(kMixedScriptText),
data/tesseract-4.1.1/unittest/scanutils_test.cc:74:8:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  r1 = fscanf(fp1, "%1023s", s1);
data/tesseract-4.1.1/unittest/scanutils_test.cc:78: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).
  EXPECT_EQ(26, strlen(s2));
data/tesseract-4.1.1/unittest/scanutils_test.cc:79:8:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  r1 = fscanf(fp1, "%20s", s1);
data/tesseract-4.1.1/unittest/scanutils_test.cc:83: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).
  EXPECT_EQ(20, strlen(s2));
data/tesseract-4.1.1/unittest/scanutils_test.cc:85:8:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  r1 = fscanf(fp1, "%1023s", s1);
data/tesseract-4.1.1/unittest/scanutils_test.cc:89: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).
  EXPECT_EQ(6, strlen(s2));
data/tesseract-4.1.1/unittest/scanutils_test.cc:90:8:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  r1 = fscanf(fp1, "%1023s", s1);
data/tesseract-4.1.1/unittest/scanutils_test.cc:94: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).
  EXPECT_EQ(2, strlen(s2));
data/tesseract-4.1.1/unittest/scanutils_test.cc:105:8:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  r1 = fscanf(fp1, "%d %1023s", &i1[0], s1);
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:88: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).
  EXPECT_EQ(strlen(kEngText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:89: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).
            renderer_->RenderToImage(kEngText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:96: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).
  EXPECT_EQ(strlen(kKorText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:97: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).
            renderer_->RenderToImage(kKorText, strlen(kKorText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:103: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).
  EXPECT_EQ(strlen(kHinText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:104: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).
            renderer_->RenderToImage(kHinText, strlen(kHinText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:111: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).
  EXPECT_EQ(strlen(kArabicText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:112: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).
            renderer_->RenderToImage(kArabicText, strlen(kArabicText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:120: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).
  EXPECT_EQ(strlen(kMixedText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:121:50:  [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).
            renderer_->RenderToImage(kMixedText, strlen(kMixedText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:134: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).
  EXPECT_EQ(strlen(kEngText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:135: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).
            renderer_->RenderToImage(kEngText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:145: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).
  EXPECT_EQ(strlen(kEngText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:146: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).
            renderer_->RenderToImage(kEngText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:156: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).
  EXPECT_EQ(strlen(kEngText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:157: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).
            renderer_->RenderToImage(kEngText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:169: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).
  EXPECT_EQ(strlen(kRawText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:170: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).
            renderer_->RenderToImage(kRawText, strlen(kRawText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:191:7:  [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(kArabicLigature),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:192:49:  [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).
      renderer_->RenderToImage(kArabicLigature, strlen(kArabicLigature), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:204:46:  [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).
  renderer_->RenderToImage(kArabicMixedText, strlen(kArabicMixedText), &pix);
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:223: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).
  renderer_->RenderToImage(kArabicWord, strlen(kArabicWord), &pix);
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:246: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).
  renderer_->RenderToImage(kArabicWord, strlen(kArabicWord), &pix);
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:258: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).
  renderer_->RenderToImage(kEnglishWord, strlen(kEnglishWord), &pix);
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:259:30:  [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).
  EXPECT_EQ(boxchars.size(), strlen(kEnglishWord));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:268: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).
  renderer_->RenderToImage(kMixedText, strlen(kMixedText), &pix);
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:279: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).
  EXPECT_EQ(strlen(kKorText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:280: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).
            renderer_->RenderToImage(kKorText, strlen(kKorText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:294:15:  [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).
    EXPECT_EQ(strlen(kEngText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:295:50:  [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).
              renderer_->RenderToImage(kEngText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:314: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).
  EXPECT_EQ(strlen(kEngText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:315: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).
            renderer_->RenderToImage(kEngText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:321: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).
  EXPECT_EQ(strlen(kEngText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:322: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).
            renderer_->RenderToImage(kEngText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:331: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).
  EXPECT_EQ(strlen(kEngNonLigatureText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:333: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).
                                     strlen(kEngNonLigatureText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:336: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).
  EXPECT_EQ(strlen(kEngNonLigatureText) - 1, renderer_->GetBoxes().size());
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:344: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).
  EXPECT_EQ(strlen(kEngLigatureText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:345:56:  [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).
            renderer_->RenderToImage(kEngLigatureText, strlen(kEngLigatureText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:349: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).
  EXPECT_EQ(strlen(kEngNonLigatureText) - 1, renderer_->GetBoxes().size());
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:367: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).
  EXPECT_EQ(strlen(kEngText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:368: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).
            renderer_->RenderToImage(kEngText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:392: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).
  EXPECT_EQ(strlen(kMultlineText),
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:393:53:  [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).
            renderer_->RenderToImage(kMultlineText, strlen(kEngText), &pix));
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:420:33:  [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).
        1.0, kEngText + offset, strlen(kEngText + offset), &font_used, &pix);
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:421:18:  [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 (offset < strlen(kEngText)) {
data/tesseract-4.1.1/unittest/stringrenderer_test.cc:427: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).
  } while (offset < strlen(kEngText));

ANALYSIS SUMMARY:

Hits = 576
Lines analyzed = 222162 in approximately 5.14 seconds (43248 lines/second)
Physical Source Lines of Code (SLOC) = 158348
Hits@level = [0] 280 [1] 236 [2] 263 [3]  24 [4]  53 [5]   0
Hits@level+ = [0+] 856 [1+] 576 [2+] 340 [3+]  77 [4+]  53 [5+]   0
Hits/KSLOC@level+ = [0+] 5.40582 [1+] 3.63756 [2+] 2.14717 [3+] 0.486271 [4+] 0.334706 [5+]   0
Dot directories skipped = 3 (--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.