The following issues were found
caffe2/perfkernels/math.h
1 issues
Line: 26
Column: 10
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
std::uint8_t* output_data,
std::uint64_t input_size,
std::uint64_t bitwidth,
bool random,
const float* random_buffer);
void decompress_and_dequantize(
const std::uint8_t* input_data,
float* output_data,
Reported by FlawFinder.
torch/utils/ffi/__init__.py
1 issues
Line: 1
Column: 1
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
Reported by Pylint.
torch/package/_stdlib.py
1 issues
Line: 13
Column: 1
import sys
def is_stdlib_module(module: str) -> bool:
base_module = module.partition(".")[0]
return base_module in _get_stdlib_modules()
def _get_stdlib_modules():
Reported by Pylint.
torch/utils/benchmark/__init__.py
1 issues
Line: 1
Column: 1
from torch.utils.benchmark.utils.common import * # noqa: F403
from torch.utils.benchmark.utils.timer import * # noqa: F403
from torch.utils.benchmark.utils.compare import * # noqa: F403
from torch.utils.benchmark.utils.fuzzer import * # noqa: F403
from torch.utils.benchmark.utils.valgrind_wrapper.timer_interface import * # noqa: F403
from torch.utils.benchmark.utils.sparse_fuzzer import * # noqa: F403
Reported by Pylint.
torch/utils/hipify/constants.py
1 issues
Line: 9
Column: 1
mapping.
"""
CONV_VERSION = 0,
CONV_INIT = 1
CONV_DEVICE = 2
CONV_MEM = 3
CONV_KERN = 4
CONV_COORD_FUNC = 5
Reported by Pylint.
torch/nn/backends/thnn.py
1 issues
Line: 1
Column: 1
# this is for historical pickle deserilaization, it is not used otherwise
def _get_thnn_function_backend():
pass
Reported by Pylint.
torch/utils/data/datapipes/map/__init__.py
1 issues
Line: 1
Column: 1
# Functional DataPipe
from torch.utils.data.datapipes.map.callable import MapMapDataPipe as Map
from torch.utils.data.datapipes.map.combining import \
(ConcatMapDataPipe as Concat)
__all__ = ['Map', 'Concat']
Reported by Pylint.
torch/utils/hipify/version.py
1 issues
Line: 1
Column: 1
__version__ = '1.0.0'
Reported by Pylint.
torch/lib/libshm/alloc_info.h
1 issues
Line: 8
Column: 3
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
struct AllocInfo {
pid_t pid;
char free;
char filename[60];
};
Reported by FlawFinder.
torch/csrc/QScheme.cpp
1 issues
Line: 20
Column: 8
CWE codes:
120
if (!self) throw python_error();
auto self_ = reinterpret_cast<THPQScheme*>(self.get());
self_->qscheme = qscheme;
std::strncpy (self_->name, name.c_str(), QSCHEME_NAME_LEN);
self_->name[QSCHEME_NAME_LEN] = '\0';
return self.release();
}
PyObject *THPQScheme_reduce(PyObject *_self, PyObject *noargs) {
Reported by FlawFinder.