mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 853536 - Never write to size-only decoders when we've already gotten the size. r=jrmuizel
--HG-- extra : rebase_source : 14e8cf30dc665eab10e04ef643513bcfad633ea2
This commit is contained in:
parent
a679f9774a
commit
60c742750a
@ -213,11 +213,6 @@ nsICODecoder::WriteInternal(const char* aBuffer, uint32_t aCount)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(!HasError(), "Shouldn't call WriteInternal after error!");
|
||||
|
||||
if (IsSizeDecode() && HasSize()) {
|
||||
// More data came in since we found the size. We have nothing to do here.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!aCount) {
|
||||
if (mContainedDecoder) {
|
||||
WriteToContainedDecoder(aBuffer, aCount);
|
||||
|
@ -194,11 +194,6 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
|
||||
|
||||
NS_ABORT_IF_FALSE(!HasError(), "Shouldn't call WriteInternal after error!");
|
||||
|
||||
if (IsSizeDecode() && HasSize()) {
|
||||
// More data came in since we found the size. We have nothing to do here.
|
||||
return;
|
||||
}
|
||||
|
||||
/* Return here if there is a fatal error within libjpeg. */
|
||||
nsresult error_code;
|
||||
// This cast to nsresult makes sense because setjmp() returns whatever we
|
||||
|
@ -97,6 +97,11 @@ Decoder::Write(const char* aBuffer, uint32_t aCount)
|
||||
if (HasDataError())
|
||||
return;
|
||||
|
||||
if (IsSizeDecode() && HasSize()) {
|
||||
// More data came in since we found the size. We have nothing to do here.
|
||||
return;
|
||||
}
|
||||
|
||||
// Pass the data along to the implementation
|
||||
WriteInternal(aBuffer, aCount);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user