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/caffe-1.0.0+git20180821.99bd997/examples/cifar10/convert_cifar_data.cpp Examining data/caffe-1.0.0+git20180821.99bd997/examples/cpp_classification/classification.cpp Examining data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp Examining data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/blob.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/caffe.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/common.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/data_transformer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/filler.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/internal_thread.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layer_factory.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/absval_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/accuracy_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/argmax_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/base_conv_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/base_data_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/batch_norm_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/batch_reindex_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/bias_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/bnll_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/clip_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/concat_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/contrastive_loss_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/conv_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/crop_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_conv_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_deconv_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_lcn_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_lrn_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_pooling_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_relu_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_sigmoid_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_softmax_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/cudnn_tanh_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/data_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/deconv_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/dropout_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/dummy_data_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/eltwise_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/elu_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/embed_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/euclidean_loss_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/exp_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/filter_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/flatten_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/hdf5_data_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/hdf5_output_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/hinge_loss_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/im2col_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/image_data_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/infogain_loss_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/inner_product_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/input_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/log_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/loss_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/lrn_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/lstm_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/memory_data_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/multinomial_logistic_loss_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/mvn_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/neuron_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/parameter_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/pooling_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/power_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/prelu_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/python_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/recurrent_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/reduction_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/relu_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/reshape_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/rnn_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/scale_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/sigmoid_cross_entropy_loss_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/sigmoid_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/silence_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/slice_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/softmax_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/softmax_loss_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/split_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/spp_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/swish_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/tanh_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/threshold_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/tile_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/layers/window_data_layer.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/net.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/parallel.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/sgd_solvers.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/solver.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/solver_factory.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/syncedmem.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/test/test_caffe_main.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/test/test_gradient_check_util.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/benchmark.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/blocking_queue.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/cudnn.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/db.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/db_leveldb.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/db_lmdb.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/device_alternate.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/format.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/hdf5.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/im2col.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/insert_splits.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/io.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/math_functions.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/mkl_alternate.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/nccl.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/rng.hpp Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/signal_handler.h Examining data/caffe-1.0.0+git20180821.99bd997/include/caffe/util/upgrade_proto.hpp Examining data/caffe-1.0.0+git20180821.99bd997/matlab/+caffe/private/caffe_.cpp Examining data/caffe-1.0.0+git20180821.99bd997/python/caffe/_caffe.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/blob.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/common.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/data_transformer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/internal_thread.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layer_factory.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/absval_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/accuracy_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/argmax_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/base_conv_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/base_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/batch_norm_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/batch_reindex_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/bias_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/bnll_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/clip_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/concat_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/contrastive_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/conv_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/crop_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_conv_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_deconv_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_lcn_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_lrn_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_pooling_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_relu_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_sigmoid_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_softmax_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/cudnn_tanh_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/deconv_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/dropout_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/dummy_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/eltwise_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/elu_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/embed_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/euclidean_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/exp_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/filter_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/flatten_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/hdf5_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/hdf5_output_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/hinge_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/im2col_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/image_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/infogain_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/inner_product_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/input_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/log_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/lrn_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/lstm_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/lstm_unit_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/memory_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/multinomial_logistic_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/mvn_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/neuron_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/parameter_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/pooling_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/power_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/prelu_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/recurrent_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/reduction_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/relu_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/reshape_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/rnn_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/scale_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/sigmoid_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/silence_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/slice_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/softmax_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/softmax_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/split_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/spp_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/swish_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/tanh_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/threshold_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/tile_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/window_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/net.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/parallel.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/solvers/adadelta_solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/solvers/adagrad_solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/solvers/adam_solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/solvers/nesterov_solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/solvers/rmsprop_solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/solvers/sgd_solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/syncedmem.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_accuracy_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_argmax_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_batch_norm_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_batch_reindex_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_benchmark.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_bias_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_blob.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_caffe_main.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_common.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_concat_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_contrastive_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_convolution_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_crop_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_data_transformer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_db.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_dummy_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_eltwise_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_embed_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_euclidean_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_filler.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_filter_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_flatten_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_gradient_based_solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_hdf5_output_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_hdf5data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_hinge_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_im2col_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_image_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_infogain_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_inner_product_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_internal_thread.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_layer_factory.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_lrn_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_lstm_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_math_functions.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_maxpool_dropout_layers.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_memory_data_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_multinomial_logistic_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_mvn_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_net.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_neuron_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_platform.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_pooling_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_power_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_protobuf.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_random_number_generator.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_reduction_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_reshape_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_rnn_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_scale_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_slice_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_softmax_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_softmax_with_loss_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_solver.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_solver_factory.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_split_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_spp_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_stochastic_pooling.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_syncedmem.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_tanh_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_threshold_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_tile_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_upgrade_proto.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_util_blas.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_deconvolution_layer.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_io.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/benchmark.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/blocking_queue.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/cudnn.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/db.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/db_leveldb.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/db_lmdb.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/hdf5.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/im2col.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/insert_splits.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/math_functions.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/signal_handler.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/upgrade_proto.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/io.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp Examining data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h Examining data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest_main.cc Examining data/caffe-1.0.0+git20180821.99bd997/tools/caffe.cpp Examining data/caffe-1.0.0+git20180821.99bd997/tools/compute_image_mean.cpp Examining data/caffe-1.0.0+git20180821.99bd997/tools/convert_imageset.cpp Examining data/caffe-1.0.0+git20180821.99bd997/tools/extract_features.cpp Examining data/caffe-1.0.0+git20180821.99bd997/tools/upgrade_net_proto_binary.cpp Examining data/caffe-1.0.0+git20180821.99bd997/tools/upgrade_net_proto_text.cpp Examining data/caffe-1.0.0+git20180821.99bd997/tools/upgrade_solver_proto_text.cpp FINAL RESULTS: data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:1439:10: [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. # define vsnprintf _vsnprintf data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2143:12: [4] (buffer) StrNCpy: 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). posix::StrNCpy(clone, str, length); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2763:12: [4] (buffer) StrNCpy: 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). posix::StrNCpy( data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:3016:20: [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. const int size = vsnprintf(buffer, kBufferSize, format, args); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:3020:20: [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. const int size = vsnprintf(buffer, kBufferSize, format, args); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:3937:5: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:3956:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:3963:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8604:10: [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. # define snprintf _snprintf data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8604:19: [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. # define snprintf _snprintf data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8606:10: [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. # define snprintf _snprintf_s data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8608:10: [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. # define snprintf _snprintf data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8608:19: [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. # define snprintf _snprintf data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:2671:20: [4] (buffer) StrNCpy: 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). inline const char* StrNCpy(char* dest, const char* src, size_t n) { data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:8110:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(\ data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_data_layer.cpp:323: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(seed_); data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_data_layer.cpp:346: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(seed_); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:699:37: [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. void ShuffleRange(internal::Random* random, int begin, int end, data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:720: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. inline void Shuffle(internal::Random* random, std::vector<E>* v) { data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:721: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. ShuffleRange(random, 0, static_cast<int>(v->size()), v); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:1171:21: [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. internal::Random* random() { return &random_; } data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:3766:47: [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. void TestCase::ShuffleTests(internal::Random* random) { data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:3767: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. Shuffle(random, &test_indices_); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:5518:7: [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()->Reseed(random_seed_); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:5789: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. ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:5792: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. ShuffleRange(random(), last_death_test_case_ + 1, data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:5797:34: [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. test_cases_[i]->ShuffleTests(random()); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:2709: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. const char* const env = getenv(name); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:2712:10: [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. return getenv(name); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:17891: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. void ShuffleTests(internal::Random* random); data/caffe-1.0.0+git20180821.99bd997/examples/cifar10/convert_cifar_data.cpp:46: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_buffer[kCIFARImageNBytes]; data/caffe-1.0.0+git20180821.99bd997/src/caffe/common.cpp:25: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("/dev/urandom", "rb"); data/caffe-1.0.0+git20180821.99bd997/src/caffe/layers/image_data_layer.cpp:45:13: [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). label = atoi(line.substr(pos + 1).c_str()); data/caffe-1.0.0+git20180821.99bd997/src/caffe/parallel.cpp:131: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(&nccl_uid, &uid[0], NCCL_UNIQUE_ID_BYTES); // NOLINT(caffe/alt_fn) data/caffe-1.0.0+git20180821.99bd997/src/caffe/parallel.cpp:184: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(&uid[0], &nccl_uid, NCCL_UNIQUE_ID_BYTES); // NOLINT(caffe/alt_fn) data/caffe-1.0.0+git20180821.99bd997/src/caffe/test/test_caffe_main.cpp:24: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). device = atoi(argv[1]); data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/io.cpp:38:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(filename, O_RDONLY); data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/io.cpp:48:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/io.cpp:56:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(filename, O_RDONLY); data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/math_functions.cpp:96: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(Y, X, sizeof(Dtype) * N); // NOLINT(caffe/alt_fn) data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2166:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, ansi, length, data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2169:3: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, ansi, length, data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2657: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 error_text[kBufSize] = { '\0' }; data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2825: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 buffer[32]; // CodePointToUtf8 requires a buffer this big. data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:3007: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[4096]; data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:6470: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/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:6889: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 executable_path[_MAX_PATH + 1]; // NOLINT data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:7533: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:7536: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8217: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(buffer, regex, len); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8295: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_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8296: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_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8314:29: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). const int captured_fd = mkstemp(name_template); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8614: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 text[5] = ""; data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:2683: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(path, mode); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:3154: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(str, buffer, a_length); data/caffe-1.0.0+git20180821.99bd997/tools/convert_imageset.cpp:81:13: [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). label = atoi(line.substr(pos + 1).c_str()); data/caffe-1.0.0+git20180821.99bd997/tools/extract_features.cpp:55:19: [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). device_id = atoi(argv[arg_pos + 1]); data/caffe-1.0.0+git20180821.99bd997/tools/extract_features.cpp:119:26: [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 num_mini_batches = atoi(argv[++arg_pos]); data/caffe-1.0.0+git20180821.99bd997/examples/cifar10/convert_cifar_data.cpp:33:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). file->read(&label_char, 1); data/caffe-1.0.0+git20180821.99bd997/examples/cifar10/convert_cifar_data.cpp:35:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). file->read(buffer, kCIFARImageNBytes); data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp:57:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(reinterpret_cast<char*>(&magic), 4); data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp:60:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). label_file.read(reinterpret_cast<char*>(&magic), 4); data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp:63:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(reinterpret_cast<char*>(&num_items), 4); data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp:65:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). label_file.read(reinterpret_cast<char*>(&num_labels), 4); data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp:68:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(reinterpret_cast<char*>(&rows), 4); data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp:70:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(reinterpret_cast<char*>(&cols), 4); data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp:91:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(pixels, rows * cols); data/caffe-1.0.0+git20180821.99bd997/examples/mnist/convert_mnist_data.cpp:92:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). label_file.read(&label, 1); data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp:31:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file->read(pixels, rows * cols); data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp:33:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). label_file->read(label, 1); data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp:50:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(reinterpret_cast<char*>(&magic), 4); data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp:53:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). label_file.read(reinterpret_cast<char*>(&magic), 4); data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp:56:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(reinterpret_cast<char*>(&num_items), 4); data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp:58:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). label_file.read(reinterpret_cast<char*>(&num_labels), 4); data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp:61:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(reinterpret_cast<char*>(&rows), 4); data/caffe-1.0.0+git20180821.99bd997/examples/siamese/convert_mnist_siamese_data.cpp:63:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_file.read(reinterpret_cast<char*>(&cols), 4); data/caffe-1.0.0+git20180821.99bd997/src/caffe/util/io.cpp:157:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). file.read(&buffer[0], size); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2154: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). NULL : CloneString(c_str, strlen(c_str)); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2164: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). const int length = strlen(ansi); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2809:34: [1] (buffer) wcslen: 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). num_chars = static_cast<int>(wcslen(str)); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2974: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 size_t this_len = strlen(c_str()); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2975: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). const size_t suffix_len = strlen(suffix); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2987: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 size_t this_len = strlen(c_str()); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:2988: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). const size_t suffix_len = strlen(suffix); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:4516: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). segment = next_segment + strlen("]]>"); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:4745: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). result.reserve(strlen(str) + 1); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:5850: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). const size_t prefix_len = strlen(prefix); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:7951: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). const size_t full_regex_len = strlen(regex) + 10; data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8205: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). const size_t len = strlen(regex); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8853: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). PrintCharsAsStringTo(s, strlen(s), os); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest-all.cpp:8870:33: [1] (buffer) wcslen: 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). PrintWideCharsAsStringTo(s, wcslen(s), os); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:2672:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). return strncpy(dest, src, n); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:2694:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return static_cast<int>(read(fd, buf, count)); data/caffe-1.0.0+git20180821.99bd997/src/gtest/gtest.h:3050: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). ConstructNonNull(a_c_str, strlen(a_c_str)); ANALYSIS SUMMARY: Hits = 95 Lines analyzed = 82011 in approximately 2.06 seconds (39800 lines/second) Physical Source Lines of Code (SLOC) = 61586 Hits@level = [0] 78 [1] 36 [2] 29 [3] 15 [4] 15 [5] 0 Hits@level+ = [0+] 173 [1+] 95 [2+] 59 [3+] 30 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 2.80908 [1+] 1.54256 [2+] 0.95801 [3+] 0.487124 [4+] 0.243562 [5+] 0 Dot directories skipped = 2 (--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.