Disable system decoder
This commit is contained in:
parent
135720bd2f
commit
fc742a223e
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,8 @@ import android.provider.MediaStore.Images
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.Priority
|
import com.bumptech.glide.Priority
|
||||||
|
import com.bumptech.glide.integration.webp.WebpBitmapFactory
|
||||||
|
import com.bumptech.glide.integration.webp.decoder.WebpDownsampler
|
||||||
import com.bumptech.glide.integration.webp.decoder.WebpDrawable
|
import com.bumptech.glide.integration.webp.decoder.WebpDrawable
|
||||||
import com.bumptech.glide.integration.webp.decoder.WebpDrawableTransformation
|
import com.bumptech.glide.integration.webp.decoder.WebpDrawableTransformation
|
||||||
import com.bumptech.glide.load.DataSource
|
import com.bumptech.glide.load.DataSource
|
||||||
|
@ -539,9 +541,11 @@ fun Context.loadImageBase(
|
||||||
options.optionalTransform(WebpDrawable::class.java, MultiTransformation(WebpDrawableTransformation(CenterCrop()), WebpDrawableTransformation(roundedCornersTransform)))
|
options.optionalTransform(WebpDrawable::class.java, MultiTransformation(WebpDrawableTransformation(CenterCrop()), WebpDrawableTransformation(roundedCornersTransform)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebpBitmapFactory.sUseSystemDecoder = false // CVE-2023-4863
|
||||||
var builder = Glide.with(applicationContext)
|
var builder = Glide.with(applicationContext)
|
||||||
.load(path)
|
.load(path)
|
||||||
.apply(options)
|
.apply(options)
|
||||||
|
.set(WebpDownsampler.USE_SYSTEM_DECODER, false) // CVE-2023-4863
|
||||||
.transition(DrawableTransitionOptions.withCrossFade(crossFadeDuration))
|
.transition(DrawableTransitionOptions.withCrossFade(crossFadeDuration))
|
||||||
|
|
||||||
if (tryLoadingWithPicasso) {
|
if (tryLoadingWithPicasso) {
|
||||||
|
|
Loading…
Reference in a new issue