The following issues were found
src/third_party/mozjs-60/extract/js/src/vm/JSObject.cpp
6 issues
Line: 112
}
}
JS_PUBLIC_API(const char*)
JS::InformalValueTypeName(const Value& v)
{
if (v.isObject())
return v.toObject().getClass()->name;
if (v.isString())
Reported by Cppcheck.
Line: 3344
Column: 17
CWE codes:
134
Suggestion:
Use a constant for the format specification
}
if (slotname)
snprintf(buf, bufsize, pattern, slotname);
else
snprintf(buf, bufsize, "**UNKNOWN SLOT %" PRIu32 "**", slot);
} while (false);
} else {
jsid propid = shape->propid();
Reported by FlawFinder.
Line: 3351
Column: 13
CWE codes:
134
Suggestion:
Use a constant for the format specification
} else {
jsid propid = shape->propid();
if (JSID_IS_INT(propid)) {
snprintf(buf, bufsize, "%" PRId32, JSID_TO_INT(propid));
} else if (JSID_IS_ATOM(propid)) {
PutEscapedString(buf, bufsize, JSID_TO_ATOM(propid), 0);
} else if (JSID_IS_SYMBOL(propid)) {
snprintf(buf, bufsize, "**SYMBOL KEY**");
} else {
Reported by FlawFinder.
Line: 1682
Column: 9
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
// contents.
size_t size = a->tenuredSizeOfThis();
char tmp[mozilla::tl::Max<sizeof(JSFunction), sizeof(JSObject_Slots16)>::value];
MOZ_ASSERT(size <= sizeof(tmp));
js_memcpy(tmp, a, size);
js_memcpy(a, b, size);
js_memcpy(b, tmp, size);
Reported by FlawFinder.
Line: 1741
Column: 9
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
}
// Swap the main fields of the objects, whether they are native objects or proxies.
char tmp[sizeof(JSObject_Slots0)];
js_memcpy(&tmp, a, sizeof tmp);
js_memcpy(a, b, sizeof tmp);
js_memcpy(b, &tmp, sizeof tmp);
a->fixDictionaryShapeAfterSwap();
Reported by FlawFinder.
Line: 1950
Column: 50
CWE codes:
126
{
RootedObject protoProto(cx, protoProto_);
RootedAtom atom(cx, Atomize(cx, clasp->name, strlen(clasp->name)));
if (!atom)
return nullptr;
/*
* All instances of the class will inherit properties from the prototype
Reported by FlawFinder.
src/third_party/wiredtiger/test/suite/test_baseconfig.py
6 issues
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
import os
import wiredtiger, wttest
# test_baseconfig
# test base configuration file being ignored.
class test_baseconfig(wttest.WiredTigerTestCase):
def test_baseconfig(self):
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
Reported by Pylint.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
import os
import wiredtiger, wttest
# test_baseconfig
# test base configuration file being ignored.
class test_baseconfig(wttest.WiredTigerTestCase):
def test_baseconfig(self):
Reported by Pylint.
Line: 34
Column: 1
# test_baseconfig
# test base configuration file being ignored.
class test_baseconfig(wttest.WiredTigerTestCase):
def test_baseconfig(self):
# Open up another database and modify the baseconfig
os.mkdir("A")
conn = self.wiredtiger_open("A", 'create')
# Mark the new directory as corrupted
Reported by Pylint.
Line: 34
Column: 1
# test_baseconfig
# test base configuration file being ignored.
class test_baseconfig(wttest.WiredTigerTestCase):
def test_baseconfig(self):
# Open up another database and modify the baseconfig
os.mkdir("A")
conn = self.wiredtiger_open("A", 'create')
# Mark the new directory as corrupted
Reported by Pylint.
Line: 35
Column: 5
# test_baseconfig
# test base configuration file being ignored.
class test_baseconfig(wttest.WiredTigerTestCase):
def test_baseconfig(self):
# Open up another database and modify the baseconfig
os.mkdir("A")
conn = self.wiredtiger_open("A", 'create')
# Mark the new directory as corrupted
self.databaseCorrupted("A")
Reported by Pylint.
src/third_party/wiredtiger/ext/encryptors/rotn/rotn_encrypt.c
6 issues
Line: 375
CWE codes:
401
rotn_encryptor->rot_N = keyid_val;
*customp = (WT_ENCRYPTOR *)rotn_encryptor;
return (0);
err:
free(rotn_encryptor->keyid);
free(rotn_encryptor->secretkey);
free(rotn_encryptor->shift_forw);
Reported by Cppcheck.
Line: 196
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
* checksum and initialize the IV here.
*/
i = CHKSUM_LEN + IV_LEN;
memcpy(&dst[i], &src[0], src_len);
/*
* Depending on whether we have a secret key or not, call the common rotate or shift function on
* the text portion of the destination buffer. Send in src_len as the length of the text.
*/
if (rotn_encryptor->shift_len == 0)
Reported by FlawFinder.
Line: 252
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
* Copy the encrypted data to the destination buffer and then decrypt the destination buffer.
*/
i = CHKSUM_LEN + IV_LEN;
memcpy(&dst[0], &src[i], mylen);
/*
* Depending on whether we have a secret key or not, call the common rotate or shift function on
* the text portion of the destination buffer. Send in dst_len as the length of the text.
*/
/*
Reported by FlawFinder.
Line: 321
Column: 26
CWE codes:
190
Suggestion:
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)
/*
* In this demonstration, we expect keyid to be a number.
*/
if ((keyid_val = atoi(keyid.str)) < 0) {
ret = rotn_error(rotn_encryptor, NULL, EINVAL, "rotn_customize: invalid keyid");
goto err;
}
if ((rotn_encryptor->keyid = malloc(keyid.len + 1)) == NULL) {
ret = errno;
Reported by FlawFinder.
Line: 329
Column: 9
CWE codes:
120
ret = errno;
goto err;
}
strncpy(rotn_encryptor->keyid, keyid.str, keyid.len + 1);
rotn_encryptor->keyid[keyid.len] = '\0';
}
/*
* In this demonstration, the secret key must be alphabetic characters. We stash the secret key
Reported by FlawFinder.
Line: 364
Column: 9
CWE codes:
120
rotn_encryptor->shift_back[i] = base - (u_char)secret.str[i];
}
rotn_encryptor->shift_len = len;
strncpy(rotn_encryptor->secretkey, secret.str, secret.len + 1);
rotn_encryptor->secretkey[secret.len] = '\0';
}
/*
* In a real encryptor, we could use some sophisticated key management here to map the keyid
Reported by FlawFinder.
src/third_party/wiredtiger/test/suite/test_base03.py
6 issues
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
# test_base03.py
# Cursor operations
class test_base03(wttest.WiredTigerTestCase):
"""
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
# test_base03.py
# Cursor operations
class test_base03(wttest.WiredTigerTestCase):
"""
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
# test_base03.py
# Cursor operations
class test_base03(wttest.WiredTigerTestCase):
"""
Reported by Pylint.
Line: 33
Column: 1
# test_base03.py
# Cursor operations
class test_base03(wttest.WiredTigerTestCase):
"""
Test basic operations
"""
table_name1 = 'test_base03a'
table_name2 = 'test_base03b'
Reported by Pylint.
Line: 43
Column: 5
table_name4 = 'test_base03d'
nentries = 10
def config_string(self):
"""
Return any additional configuration.
This method may be overridden.
"""
return ''
Reported by Pylint.
src/mongo/db/geo/hash.cpp
6 issues
Line: 485
Column: 5
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
namespace {
void appendHashToBuilder(long long hash, BSONObjBuilder* builder, const char* fieldName) {
char buf[8];
if constexpr (kNativeLittle) {
// Reverse the order of bytes when copying between BinData and GeoHash.
// GeoHashes are meant to be compared from MSB to LSB, where the first 2 MSB indicate the
// quadrant.
// In BinData, the GeoHash of a 2D index is compared from LSB to MSB, so the bytes should be
Reported by FlawFinder.
Line: 494
Column: 14
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
// reversed on little-endian systems
copyAndReverse(buf, (char*)&hash);
} else {
std::memcpy(buf, reinterpret_cast<char*>(&hash), 8);
}
builder->appendBinData(fieldName, 8, bdtCustom, buf);
}
template <typename KeyStringBuilder>
Reported by FlawFinder.
Line: 501
Column: 5
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
template <typename KeyStringBuilder>
void appendHashToKeyString(long long hash, KeyStringBuilder* ks) {
char buf[8];
if constexpr (kNativeLittle) {
// Reverse the order of bytes when copying between BinData and GeoHash.
// GeoHashes are meant to be compared from MSB to LSB, where the first 2 MSB indicate the
// quadrant.
// In BinData, the GeoHash of a 2D index is compared from LSB to MSB, so the bytes should be
Reported by FlawFinder.
Line: 510
Column: 14
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
// reversed on little-endian systems
copyAndReverse(buf, (char*)&hash);
} else {
std::memcpy(buf, reinterpret_cast<char*>(&hash), 8);
}
ks->appendBinData(BSONBinData(buf, 8, bdtCustom));
}
} // namespace
Reported by FlawFinder.
Line: 146
Column: 18
CWE codes:
126
}
void GeoHash::initFromString(const char* s) {
int length = strlen(s);
uassert(16457, "initFromString passed a too-long string", length <= 64);
uassert(16458, "initFromString passed an odd length string ", 0 == (length % 2));
_hash = 0;
// _bits is how many bits for X or Y, not both, so we divide by 2.
_bits = length / 2;
Reported by FlawFinder.
Line: 448
Column: 14
CWE codes:
126
// though we also treat non-'1' values as '0'.
GeoHash& GeoHash::operator+=(const char* s) {
unsigned pos = _bits * 2;
_bits += strlen(s) / 2;
verify(_bits <= 32);
while ('\0' != s[0]) {
if (s[0] == '1')
setBit(pos, 1);
pos++;
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/jsdate.cpp
6 issues
Line: 2814
Column: 9
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
char buf[100];
if (!IsFinite(utcTime)) {
strcpy(buf, js_NaN_date_str);
} else {
double localTime = LocalTime(utcTime);
/* Let PRMJTime format it. */
size_t result_len = FormatTime(buf, sizeof buf, format, utcTime, localTime);
Reported by FlawFinder.
Line: 2551
Column: 9
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
if (!IsFinite(utctime)) {
str = NewStringCopyZ<CanGC>(cx, js_NaN_date_str);
} else {
char buf[100];
SprintfLiteral(buf, "%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT",
days[int(WeekDay(utctime))],
int(DateFromTime(utctime)),
months[int(MonthFromTime(utctime))],
int(YearFromTime(utctime)),
Reported by FlawFinder.
Line: 2587
Column: 5
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
return false;
}
char buf[100];
int year = int(YearFromTime(utctime));
if (year < 0 || year > 9999) {
SprintfLiteral(buf, "%+.6d-%.2d-%.2dT%.2d:%.2d:%.2d.%.3dZ",
int(YearFromTime(utctime)),
int(MonthFromTime(utctime)) + 1,
Reported by FlawFinder.
Line: 2713
Column: 9
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
double localTime = LocalTime(utcTime);
int offset = 0;
char tzbuf[100];
bool usetz = false;
if (format == FormatSpec::DateTime || format == FormatSpec::Time) {
/*
* Offset from GMT in minutes. The offset includes daylight
* savings, if it applies.
Reported by FlawFinder.
Line: 2761
Column: 9
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
}
}
char buf[100];
switch (format) {
case FormatSpec::DateTime:
/* Tue Oct 31 2000 09:41:40 GMT-0800 (PST) */
SprintfLiteral(buf, "%s %s %.2d %.4d %.2d:%.2d:%.2d GMT%+.4d%s%s",
days[int(WeekDay(localTime))],
Reported by FlawFinder.
Line: 2812
Column: 5
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
{
double utcTime = obj->as<DateObject>().UTCTime().toNumber();
char buf[100];
if (!IsFinite(utcTime)) {
strcpy(buf, js_NaN_date_str);
} else {
double localTime = LocalTime(utcTime);
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/jit/x86/LIR-x86.h
6 issues
Line: 334
Column: 89
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
LIR_HEADER(WasmAtomicExchangeI64);
LWasmAtomicExchangeI64(const LAllocation& memoryBase, const LAllocation& ptr,
const LInt64Allocation& value, const wasm::MemoryAccessDesc& access)
: LInstructionHelper(classOpcode),
access_(access)
{
setOperand(0, memoryBase);
setOperand(1, ptr);
Reported by FlawFinder.
Line: 336
Column: 17
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
LWasmAtomicExchangeI64(const LAllocation& memoryBase, const LAllocation& ptr,
const LInt64Allocation& value, const wasm::MemoryAccessDesc& access)
: LInstructionHelper(classOpcode),
access_(access)
{
setOperand(0, memoryBase);
setOperand(1, ptr);
setInt64Operand(2, value);
}
Reported by FlawFinder.
Line: 352
Column: 35
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
const LInt64Allocation value() {
return getInt64Operand(2);
}
const wasm::MemoryAccessDesc& access() {
return access_;
}
};
class LWasmAtomicBinopI64 : public LInstructionHelper<INT64_PIECES, 2 + INT64_PIECES, 0>
Reported by FlawFinder.
Line: 366
Column: 86
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
LIR_HEADER(WasmAtomicBinopI64);
LWasmAtomicBinopI64(const LAllocation& memoryBase, const LAllocation& ptr,
const LInt64Allocation& value, const wasm::MemoryAccessDesc& access,
AtomicOp op)
: LInstructionHelper(classOpcode),
access_(access),
op_(op)
{
Reported by FlawFinder.
Line: 369
Column: 17
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
const LInt64Allocation& value, const wasm::MemoryAccessDesc& access,
AtomicOp op)
: LInstructionHelper(classOpcode),
access_(access),
op_(op)
{
setOperand(0, memoryBase);
setOperand(1, ptr);
setInt64Operand(2, value);
Reported by FlawFinder.
Line: 386
Column: 35
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
const LInt64Allocation value() {
return getInt64Operand(2);
}
const wasm::MemoryAccessDesc& access() {
return access_;
}
AtomicOp operation() const {
return op_;
}
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/jit/mips64/MacroAssembler-mips64.h
6 issues
Line: 687
Column: 60
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void storeUnalignedSimd128Float(FloatRegister src, Address addr) { MOZ_CRASH("NYI"); }
void storeUnalignedSimd128Float(FloatRegister src, BaseIndex addr) { MOZ_CRASH("NYI"); }
void loadUnalignedDouble(const wasm::MemoryAccessDesc& access, const BaseIndex& src,
Register temp, FloatRegister dest);
void loadUnalignedFloat32(const wasm::MemoryAccessDesc& access, const BaseIndex& src,
Register temp, FloatRegister dest);
void store8(Register src, const Address& address);
Reported by FlawFinder.
Line: 689
Column: 61
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void loadUnalignedDouble(const wasm::MemoryAccessDesc& access, const BaseIndex& src,
Register temp, FloatRegister dest);
void loadUnalignedFloat32(const wasm::MemoryAccessDesc& access, const BaseIndex& src,
Register temp, FloatRegister dest);
void store8(Register src, const Address& address);
void store8(Imm32 imm, const Address& address);
void store8(Register src, const BaseIndex& address);
Reported by FlawFinder.
Line: 729
Column: 62
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void storePtr(Register src, const BaseIndex& address);
void storePtr(Register src, AbsoluteAddress dest);
void storeUnalignedFloat32(const wasm::MemoryAccessDesc& access, FloatRegister src,
Register temp, const BaseIndex& dest);
void storeUnalignedDouble(const wasm::MemoryAccessDesc& access, FloatRegister src,
Register temp, const BaseIndex& dest);
void moveDouble(FloatRegister src, FloatRegister dest) {
Reported by FlawFinder.
Line: 731
Column: 61
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void storeUnalignedFloat32(const wasm::MemoryAccessDesc& access, FloatRegister src,
Register temp, const BaseIndex& dest);
void storeUnalignedDouble(const wasm::MemoryAccessDesc& access, FloatRegister src,
Register temp, const BaseIndex& dest);
void moveDouble(FloatRegister src, FloatRegister dest) {
as_movd(dest, src);
}
Reported by FlawFinder.
Line: 768
Column: 56
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
protected:
bool buildOOLFakeExitFrame(void* fakeReturnAddr);
void wasmLoadI64Impl(const wasm::MemoryAccessDesc& access, Register memoryBase, Register ptr,
Register ptrScratch, Register64 output, Register tmp);
void wasmStoreI64Impl(const wasm::MemoryAccessDesc& access, Register64 value, Register memoryBase,
Register ptr, Register ptrScratch, Register tmp);
public:
Reported by FlawFinder.
Line: 770
Column: 57
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void wasmLoadI64Impl(const wasm::MemoryAccessDesc& access, Register memoryBase, Register ptr,
Register ptrScratch, Register64 output, Register tmp);
void wasmStoreI64Impl(const wasm::MemoryAccessDesc& access, Register64 value, Register memoryBase,
Register ptr, Register ptrScratch, Register tmp);
public:
CodeOffset labelForPatch() {
return CodeOffset(nextOffset().getOffset());
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/jit/mips64/CodeGenerator-mips64.cpp
6 issues
Line: 318
Column: 26
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
ptrScratch = ToRegister(lir->ptrCopy());
}
if (IsUnaligned(mir->access())) {
masm.wasmUnalignedLoadI64(mir->access(), HeapReg, ToRegister(lir->ptr()),
ptrScratch, ToOutRegister64(lir), ToRegister(lir->getTemp(1)));
} else {
masm.wasmLoadI64(mir->access(), HeapReg, ToRegister(lir->ptr()), ptrScratch,
ToOutRegister64(lir));
Reported by FlawFinder.
Line: 319
Column: 40
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
}
if (IsUnaligned(mir->access())) {
masm.wasmUnalignedLoadI64(mir->access(), HeapReg, ToRegister(lir->ptr()),
ptrScratch, ToOutRegister64(lir), ToRegister(lir->getTemp(1)));
} else {
masm.wasmLoadI64(mir->access(), HeapReg, ToRegister(lir->ptr()), ptrScratch,
ToOutRegister64(lir));
}
Reported by FlawFinder.
Line: 322
Column: 31
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
masm.wasmUnalignedLoadI64(mir->access(), HeapReg, ToRegister(lir->ptr()),
ptrScratch, ToOutRegister64(lir), ToRegister(lir->getTemp(1)));
} else {
masm.wasmLoadI64(mir->access(), HeapReg, ToRegister(lir->ptr()), ptrScratch,
ToOutRegister64(lir));
}
}
void
Reported by FlawFinder.
Line: 350
Column: 26
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
ptrScratch = ToRegister(lir->ptrCopy());
}
if (IsUnaligned(mir->access())) {
masm.wasmUnalignedStoreI64(mir->access(), ToRegister64(lir->value()), HeapReg,
ToRegister(lir->ptr()), ptrScratch, ToRegister(lir->getTemp(1)));
} else {
masm.wasmStoreI64(mir->access(), ToRegister64(lir->value()), HeapReg,
ToRegister(lir->ptr()), ptrScratch);
Reported by FlawFinder.
Line: 351
Column: 41
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
}
if (IsUnaligned(mir->access())) {
masm.wasmUnalignedStoreI64(mir->access(), ToRegister64(lir->value()), HeapReg,
ToRegister(lir->ptr()), ptrScratch, ToRegister(lir->getTemp(1)));
} else {
masm.wasmStoreI64(mir->access(), ToRegister64(lir->value()), HeapReg,
ToRegister(lir->ptr()), ptrScratch);
}
Reported by FlawFinder.
Line: 354
Column: 32
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
masm.wasmUnalignedStoreI64(mir->access(), ToRegister64(lir->value()), HeapReg,
ToRegister(lir->ptr()), ptrScratch, ToRegister(lir->getTemp(1)));
} else {
masm.wasmStoreI64(mir->access(), ToRegister64(lir->value()), HeapReg,
ToRegister(lir->ptr()), ptrScratch);
}
}
void
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/jit/mips32/MacroAssembler-mips32.h
6 issues
Line: 668
Column: 60
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void storeUnalignedSimd128Float(FloatRegister src, Address addr) { MOZ_CRASH("NYI"); }
void storeUnalignedSimd128Float(FloatRegister src, BaseIndex addr) { MOZ_CRASH("NYI"); }
void loadUnalignedDouble(const wasm::MemoryAccessDesc& access, const BaseIndex& src,
Register temp, FloatRegister dest);
void loadUnalignedFloat32(const wasm::MemoryAccessDesc& access, const BaseIndex& src,
Register temp, FloatRegister dest);
Reported by FlawFinder.
Line: 671
Column: 61
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void loadUnalignedDouble(const wasm::MemoryAccessDesc& access, const BaseIndex& src,
Register temp, FloatRegister dest);
void loadUnalignedFloat32(const wasm::MemoryAccessDesc& access, const BaseIndex& src,
Register temp, FloatRegister dest);
void store8(Register src, const Address& address);
void store8(Imm32 imm, const Address& address);
void store8(Register src, const BaseIndex& address);
Reported by FlawFinder.
Line: 713
Column: 62
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void storePtr(Register src, const BaseIndex& address);
void storePtr(Register src, AbsoluteAddress dest);
void storeUnalignedFloat32(const wasm::MemoryAccessDesc& access, FloatRegister src,
Register temp, const BaseIndex& dest);
void storeUnalignedDouble(const wasm::MemoryAccessDesc& access, FloatRegister src,
Register temp, const BaseIndex& dest);
void moveDouble(FloatRegister src, FloatRegister dest) {
Reported by FlawFinder.
Line: 715
Column: 61
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void storeUnalignedFloat32(const wasm::MemoryAccessDesc& access, FloatRegister src,
Register temp, const BaseIndex& dest);
void storeUnalignedDouble(const wasm::MemoryAccessDesc& access, FloatRegister src,
Register temp, const BaseIndex& dest);
void moveDouble(FloatRegister src, FloatRegister dest) {
as_movd(dest, src);
}
Reported by FlawFinder.
Line: 747
Column: 56
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void enterAtomic64Region(Register addr, Register spinlock, Register tmp);
void exitAtomic64Region(Register spinlock);
void wasmLoadI64Impl(const wasm::MemoryAccessDesc& access, Register memoryBase, Register ptr,
Register ptrScratch, Register64 output, Register tmp);
void wasmStoreI64Impl(const wasm::MemoryAccessDesc& access, Register64 value, Register memoryBase,
Register ptr, Register ptrScratch, Register tmp);
Condition ma_cmp64(Condition cond, Register64 lhs, Register64 rhs, Register dest);
Condition ma_cmp64(Condition cond, Register64 lhs, Imm64 val, Register dest);
Reported by FlawFinder.
Line: 749
Column: 57
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
void exitAtomic64Region(Register spinlock);
void wasmLoadI64Impl(const wasm::MemoryAccessDesc& access, Register memoryBase, Register ptr,
Register ptrScratch, Register64 output, Register tmp);
void wasmStoreI64Impl(const wasm::MemoryAccessDesc& access, Register64 value, Register memoryBase,
Register ptr, Register ptrScratch, Register tmp);
Condition ma_cmp64(Condition cond, Register64 lhs, Register64 rhs, Register dest);
Condition ma_cmp64(Condition cond, Register64 lhs, Imm64 val, Register dest);
public:
Reported by FlawFinder.