Exploit databaseDownload repository ZIP
GH-12737d57f49df9711fa1c097c9e9ec1d
nanopathi/framework_base_aosp10_r33_cve-2021-0472
Sources for CVE-2021-0472
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files28
nanopathi/framework_base_aosp10_r33_cve-2021-0472Revision 14f1ba804544
- ↑..Parent directory
- BufferingParams.java
- CloseGuard.java
- Controller2Link.aidl
- Controller2Link.java
- DataSourceCallback.java
- DataSourceDesc.java
- FileDataSourceDesc.java
- IMediaController2.aidl
- IMediaSession2.aidl
- IMediaSession2Service.aidl
- Media2HTTPConnection.java
- Media2HTTPService.java
- Media2Utils.java
- MediaConstants.java
- MediaController2.java
- MediaPlayer2.java
- MediaPlayer2Utils.java
- MediaSession2.java
- MediaSession2Service.java
- ProxyDataSourceCallback.java
- RoutingDelegate.java
- Session2Command.aidl
- Session2Command.java
- Session2CommandGroup.java
- Session2Link.java
- Session2Token.aidl
- Session2Token.java
- UriDataSourceDesc.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
media/apex/java/android/media/ProxyDataSourceCallback.java
Java · 1,995 bytes/*
* Copyright 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.media;
import android.os.ParcelFileDescriptor;
import android.system.ErrnoException;
import android.system.Os;
import android.system.OsConstants;
import android.util.Log;
import java.io.FileDescriptor;
import java.io.IOException;
/**
* A DataSourceCallback that is backed by a ParcelFileDescriptor.
*/
class ProxyDataSourceCallback extends DataSourceCallback {
private static final String TAG = "TestDataSourceCallback";
ParcelFileDescriptor mPFD;
FileDescriptor mFD;
ProxyDataSourceCallback(ParcelFileDescriptor pfd) throws IOException {
mPFD = pfd.dup();
mFD = mPFD.getFileDescriptor();
}
@Override
public synchronized int readAt(long position, byte[] buffer, int offset, int size)
throws IOException {
try {
Os.lseek(mFD, position, OsConstants.SEEK_SET);
int ret = Os.read(mFD, buffer, offset, size);
return (ret == 0) ? END_OF_STREAM : ret;
} catch (ErrnoException e) {
throw new IOException(e);
}
}
@Override
public synchronized long getSize() throws IOException {
return mPFD.getStatSize();
}
@Override
public synchronized void close() {
try {
mPFD.close();
} catch (IOException e) {
Log.e(TAG, "Failed to close the PFD.", e);
}
}
}