mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Check that cache dir exist
Not checking it would force ExoPlayer to use the global tmp dir which would expose it to external file replacement attacks. This is a theoretical vulnerability as this code is only use in tests and cache dir always exist in the AOSP android implementation. PiperOrigin-RevId: 353013929
This commit is contained in:
parent
d1faf713af
commit
a10e9de484
1 changed files with 1 additions and 1 deletions
|
|
@ -2084,7 +2084,7 @@ public final class Util {
|
||||||
|
|
||||||
/** Creates a new empty file in the directory returned by {@link Context#getCacheDir()}. */
|
/** Creates a new empty file in the directory returned by {@link Context#getCacheDir()}. */
|
||||||
public static File createTempFile(Context context, String prefix) throws IOException {
|
public static File createTempFile(Context context, String prefix) throws IOException {
|
||||||
return File.createTempFile(prefix, null, context.getCacheDir());
|
return File.createTempFile(prefix, null, checkNotNull(context.getCacheDir()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue