'LZ4_decompress_fast' is deprecated: This function is deprecated and unsafe. Consider using LZ4_decompress_safe() instead
Categories
(Core :: MFBT, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox72 | --- | fixed |
People
(Reporter: freddy, Assigned: tcampbell)
Details
Attachments
(1 file)
Full warningtext :
warning: mfbt/Compression.cpp:41:13 [-Wdeprecated-declarations] 'LZ4_decompress_fast' is deprecated: This function is deprecated and unsafe. Consider using LZ4_decompress_safe() instead
| Reporter | ||
Comment 1•6 years ago
|
||
My guess is that the supposed unsafety comes from the caller supplying the output size, but the real source of this warning is a bit unclear to me.
If that's the case, then I think our version is less problematic, given that it casts the output size into a CheckedInt?
code snippet:
bool LZ4::decompress(const char* aSource, char* aDest, size_t aOutputSize) {
CheckedInt<int> outputSizeChecked = aOutputSize;
MOZ_ASSERT(outputSizeChecked.isValid());
int ret = LZ4_decompress_fast(aSource, aDest, outputSizeChecked.value());
return ret >= 0;
}
Updated•6 years ago
|
| Assignee | ||
Comment 2•6 years ago
|
||
The implementation of this method calls deprecated functions and
generates compiler warnings. It is never used, so just remove it.
| Assignee | ||
Comment 3•6 years ago
|
||
This function doesn't seem to be used any more. I'd propose we just delete it. Pushing to try to see if things break, but patch is attached.
| Assignee | ||
Updated•6 years ago
|
Comment 5•6 years ago
|
||
| bugherder | ||
Comment 6•6 years ago
|
||
| bugherder landing | ||
Description
•