instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
private synchronized void notifyConnectionError(Exception e) { // Listeners were already notified of the exception, return right here. if ((packetReader == null || packetReader.done) && (packetWriter == null || packetWriter.done())) return; // Closes the connection temporary. A reconnection is possible // Note that a connection listener of XMPPTCPConnection will drop the SM state in // case the Exception is a StreamErrorException. instantShutdown(); // Notify connection listeners of the error. callConnectionClosedOnErrorListener(e); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyConnectionError File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
notifyConnectionError
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
private void checkThatAllUnitsHaveAttachments(final GameData data) throws GameParseException { final Collection<UnitType> errors = new ArrayList<>(); for (final UnitType ut : data.getUnitTypeList().getAllUnitTypes()) { final UnitAttachment ua = UnitAttachment.get(ut); if (ua == null) { errors.add(ut); } } if (!errors.isEmpty()) { throw newGameParseException( data.getGameName() + " does not have unit attachments for: " + MyFormatter.defaultNamedToTextList(errors)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkThatAllUnitsHaveAttachments File: game-core/src/main/java/games/strategy/engine/data/GameParser.java Repository: triplea-game/triplea The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000546
MEDIUM
6.8
triplea-game/triplea
checkThatAllUnitsHaveAttachments
game-core/src/main/java/games/strategy/engine/data/GameParser.java
0f23875a4c6e166218859a63c884995f15c53895
0
Analyze the following code function for security vulnerabilities
@Subscribe(threadMode = ThreadMode.MAIN) public void onMessageEvent(PeerConnectionEvent peerConnectionEvent) { String sessionId = peerConnectionEvent.getSessionId(); if (peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.PEER_CLOSED) { endPeerConnection(sessionId, VIDEO_STREAM_TYPE_SCREEN.equals(peerConnectionEvent.getVideoStreamType())); } else if (peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.SENSOR_FAR || peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.SENSOR_NEAR) { if (!isVoiceOnlyCall) { boolean enableVideo = peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.SENSOR_FAR && videoOn; if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA) && (currentCallStatus.equals(CallStatus.CONNECTING) || isConnectionEstablished()) && videoOn && enableVideo != localVideoTrack.enabled()) { toggleMedia(enableVideo, true); } } } else if (peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.NICK_CHANGE) { if (participantDisplayItems.get(sessionId) != null) { participantDisplayItems.get(sessionId).setNick(peerConnectionEvent.getNick()); } participantsAdapter.notifyDataSetChanged(); } else if (peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.VIDEO_CHANGE && !isVoiceOnlyCall) { if (participantDisplayItems.get(sessionId) != null) { participantDisplayItems.get(sessionId).setStreamEnabled(peerConnectionEvent.getChangeValue()); } participantsAdapter.notifyDataSetChanged(); } else if (peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.AUDIO_CHANGE) { if (participantDisplayItems.get(sessionId) != null) { participantDisplayItems.get(sessionId).setAudioEnabled(peerConnectionEvent.getChangeValue()); } participantsAdapter.notifyDataSetChanged(); } else if (peerConnectionEvent.getPeerConnectionEventType() == PeerConnectionEvent.PeerConnectionEventType.PUBLISHER_FAILED) { currentCallStatus = CallStatus.PUBLISHER_FAILED; webSocketClient.clearResumeId(); hangup(false); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onMessageEvent File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
onMessageEvent
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { Secret src = (Secret) source; writer.setValue(src.getEncryptedValue()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: marshal File: core/src/main/java/hudson/util/Secret.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-326" ]
CVE-2017-2598
MEDIUM
4
jenkinsci/jenkins
marshal
core/src/main/java/hudson/util/Secret.java
e6aa166246d1734f4798a9e31f78842f4c85c28b
0
Analyze the following code function for security vulnerabilities
Tab getCurrentTab();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentTab File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
getCurrentTab
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
public int getReadTimeout() { return readTimeout; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getReadTimeout File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java Repository: pac4j The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-44878
MEDIUM
5
pac4j
getReadTimeout
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
public void updateArray(String columnName, @Nullable Array x) throws SQLException { updateArray(findColumn(columnName), x); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateArray File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
updateArray
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
private void sendSettings() { List<Http2Setting> settings = new ArrayList<>(); settings.add(new Http2Setting(Http2Setting.SETTINGS_HEADER_TABLE_SIZE, encoderHeaderTableSize)); if(isClient()) { settings.add(new Http2Setting(Http2Setting.SETTINGS_ENABLE_PUSH, pushEnabled ? 1 : 0)); } settings.add(new Http2Setting(Http2Setting.SETTINGS_MAX_FRAME_SIZE, receiveMaxFrameSize)); settings.add(new Http2Setting(Http2Setting.SETTINGS_INITIAL_WINDOW_SIZE, initialReceiveWindowSize)); if(maxHeaderListSize > 0) { settings.add(new Http2Setting(Http2Setting.SETTINGS_MAX_HEADER_LIST_SIZE, maxHeaderListSize)); } if(receiveMaxConcurrentStreams > 0) { settings.add(new Http2Setting(Http2Setting.SETTINGS_MAX_CONCURRENT_STREAMS, receiveMaxConcurrentStreams)); } Http2SettingsStreamSinkChannel stream = new Http2SettingsStreamSinkChannel(this, settings); flushChannelIgnoreFailure(stream); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendSettings File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
sendSettings
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
private void setLocationManagerStatus(final int status) { int current = getStatus(); if (current != status) { setStatus(status); synchronized (this) { Display.getInstance().callSerially(new Runnable() { @Override public void run() { com.codename1.location.LocationListener l = getLocationListener(); if (l != null) { l.providerStateChanged(status); } } }); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLocationManagerStatus File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
setLocationManagerStatus
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override boolean handleCompleteDeferredRemoval() { if (mIsExiting) { removeIfPossible(); } return super.handleCompleteDeferredRemoval(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleCompleteDeferredRemoval File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
handleCompleteDeferredRemoval
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public static String getCrumbRequestField() { Jenkins h = Jenkins.getInstance(); CrumbIssuer issuer = h != null ? h.getCrumbIssuer() : null; return issuer != null ? issuer.getDescriptor().getCrumbRequestField() : ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCrumbRequestField File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
getCrumbRequestField
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
private void onProvisionFullyManagedDeviceStarted( FullyManagedDeviceProvisioningParams provisioningParams) {}
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onProvisionFullyManagedDeviceStarted File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
onProvisionFullyManagedDeviceStarted
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public double getDouble(int index) throws JSONException { Object o = get(index); try { return o instanceof Number ? ((Number)o).doubleValue() : Double.valueOf((String)o).doubleValue(); } catch (Exception e) { throw new JSONException("JSONArray[" + index + "] is not a number."); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDouble File: src/main/java/org/codehaus/jettison/json/JSONArray.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
getDouble
src/main/java/org/codehaus/jettison/json/JSONArray.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
protected abstract BlockCipherAdapter newCipher(CiphertextHeader header, boolean mode);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newCipher File: src/main/java/org/cryptacular/bean/AbstractBlockCipherBean.java Repository: vt-middleware/cryptacular The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-7226
MEDIUM
5
vt-middleware/cryptacular
newCipher
src/main/java/org/cryptacular/bean/AbstractBlockCipherBean.java
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
0
Analyze the following code function for security vulnerabilities
private static boolean validateKeyMgmt(BitSet keyMgmnt) { if (keyMgmnt.cardinality() > 1) { if (keyMgmnt.cardinality() > 3) { Log.e(TAG, "validateKeyMgmt failed: cardinality > 3"); return false; } if (!keyMgmnt.get(WifiConfiguration.KeyMgmt.WPA_EAP)) { Log.e(TAG, "validateKeyMgmt failed: not WPA_EAP"); return false; } if (!keyMgmnt.get(WifiConfiguration.KeyMgmt.IEEE8021X) && !keyMgmnt.get(WifiConfiguration.KeyMgmt.WPA_PSK)) { Log.e(TAG, "validateKeyMgmt failed: not PSK or 8021X"); return false; } // SUITE-B keymgmt must be WPA_EAP + IEEE8021X + SUITE_B_192. if (keyMgmnt.cardinality() == 3 && !(keyMgmnt.get(WifiConfiguration.KeyMgmt.WPA_EAP) && keyMgmnt.get(WifiConfiguration.KeyMgmt.IEEE8021X) && keyMgmnt.get(WifiConfiguration.KeyMgmt.SUITE_B_192))) { Log.e(TAG, "validateKeyMgmt failed: not SUITE_B_192"); return false; } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateKeyMgmt File: service/java/com/android/server/wifi/WifiConfigurationUtil.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21252
MEDIUM
5.5
android
validateKeyMgmt
service/java/com/android/server/wifi/WifiConfigurationUtil.java
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
0
Analyze the following code function for security vulnerabilities
public HttpResponse doDoWipeOutWorkspace() throws IOException, ServletException, InterruptedException { checkPermission(Functions.isWipeOutPermissionEnabled() ? WIPEOUT : BUILD); R b = getSomeBuildWithWorkspace(); FilePath ws = b!=null ? b.getWorkspace() : null; if (ws!=null && getScm().processWorkspaceBeforeDeletion(this, ws, b.getBuiltOn())) { ws.deleteRecursive(); for (WorkspaceListener wl : WorkspaceListener.all()) { wl.afterDelete(this); } return new HttpRedirect("."); } else { // If we get here, that means the SCM blocked the workspace deletion. return new ForwardToView(this,"wipeOutWorkspaceBlocked.jelly"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doDoWipeOutWorkspace File: core/src/main/java/hudson/model/AbstractProject.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
doDoWipeOutWorkspace
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public abstract String getMainDivId(VaadinSession session, VaadinRequest request, Class<? extends UI> uiClass);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMainDivId File: server/src/main/java/com/vaadin/server/VaadinService.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31403
LOW
1.9
vaadin/framework
getMainDivId
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
private @ColorInt int getBackgroundColor(StandardTemplateParams p) { return getColors(p).getBackgroundColor(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBackgroundColor File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getBackgroundColor
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void writeAppManifest(PackageInfo pkg, File manifestFile, boolean withApk, boolean withWidgets) throws IOException { // Manifest format. All data are strings ending in LF: // BACKUP_MANIFEST_VERSION, currently 1 // // Version 1: // package name // package's versionCode // platform versionCode // getInstallerPackageName() for this package (maybe empty) // boolean: "1" if archive includes .apk; any other string means not // number of signatures == N // N*: signature byte array in ascii format per Signature.toCharsString() StringBuilder builder = new StringBuilder(4096); StringBuilderPrinter printer = new StringBuilderPrinter(builder); printer.println(Integer.toString(BACKUP_MANIFEST_VERSION)); printer.println(pkg.packageName); printer.println(Integer.toString(pkg.versionCode)); printer.println(Integer.toString(Build.VERSION.SDK_INT)); String installerName = mPackageManager.getInstallerPackageName(pkg.packageName); printer.println((installerName != null) ? installerName : ""); printer.println(withApk ? "1" : "0"); if (pkg.signatures == null) { printer.println("0"); } else { printer.println(Integer.toString(pkg.signatures.length)); for (Signature sig : pkg.signatures) { printer.println(sig.toCharsString()); } } FileOutputStream outstream = new FileOutputStream(manifestFile); outstream.write(builder.toString().getBytes()); outstream.close(); // We want the manifest block in the archive stream to be idempotent: // each time we generate a backup stream for the app, we want the manifest // block to be identical. The underlying tar mechanism sees it as a file, // though, and will propagate its mtime, causing the tar header to vary. // Avoid this problem by pinning the mtime to zero. manifestFile.setLastModified(0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeAppManifest File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
writeAppManifest
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@Override public Iterable<File> successors(File file) { return fileTreeChildren(file); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: successors File: guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-8908
LOW
2.1
google/guava
successors
guava/src/com/google/common/io/Files.java
fec0dbc4634006a6162cfd4d0d09c962073ddf40
0
Analyze the following code function for security vulnerabilities
@Override public void doFinally() { super.doFinally(); this.pageContext.removeAttribute(MODEL_ATTRIBUTE_VARIABLE_NAME, PageContext.REQUEST_SCOPE); if (this.previousNestedPath != null) { // Expose previous nestedPath value. this.pageContext.setAttribute(NESTED_PATH_VARIABLE_NAME, this.previousNestedPath, PageContext.REQUEST_SCOPE); } else { // Remove exposed nestedPath value. this.pageContext.removeAttribute(NESTED_PATH_VARIABLE_NAME, PageContext.REQUEST_SCOPE); } this.tagWriter = null; this.previousNestedPath = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doFinally File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java Repository: spring-projects/spring-framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-1904
MEDIUM
4.3
spring-projects/spring-framework
doFinally
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
741b4b229ae032bd17175b46f98673ce0bd2d485
0
Analyze the following code function for security vulnerabilities
@Override public void registerTaskStackListener(ITaskStackListener listener) throws RemoteException { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "registerTaskStackListener()"); synchronized (this) { if (listener != null) { mTaskStackListeners.register(listener); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerTaskStackListener File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
registerTaskStackListener
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
void initMediaSessionMetadata() { MediaMetadataCompat.Builder metadataBuilder = new MediaMetadataCompat.Builder(); //Notification icon in card MediaMetaData md = RemoteControlCallback.getMetaData(); if (md == null) { return; } if (md.getDisplayIcon() != null) { Bitmap i = (Bitmap)md.getDisplayIcon().getImage(); metadataBuilder.putBitmap(MediaMetadataCompat.METADATA_KEY_DISPLAY_ICON, i); } if (md.getAlbumArt() != null) { Bitmap i = (Bitmap)md.getDisplayIcon().getImage(); metadataBuilder.putBitmap(MediaMetadataCompat.METADATA_KEY_ALBUM_ART, i); } //lock screen icon for pre lollipop if (md.getArt() != null) { Bitmap i = (Bitmap)md.getDisplayIcon().getImage(); metadataBuilder.putBitmap(MediaMetadataCompat.METADATA_KEY_ART, i); } metadataBuilder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_TITLE, md.getTitle()); metadataBuilder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_SUBTITLE, md.getSubtitle()); metadataBuilder.putLong(MediaMetadataCompat.METADATA_KEY_TRACK_NUMBER, md.getTrackNumber()); metadataBuilder.putLong(MediaMetadataCompat.METADATA_KEY_NUM_TRACKS, md.getNumTracks()); mMediaSessionCompat.setMetadata(metadataBuilder.build()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initMediaSessionMetadata File: Ports/Android/src/com/codename1/media/BackgroundAudioService.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
initMediaSessionMetadata
Ports/Android/src/com/codename1/media/BackgroundAudioService.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
protected void readDocObj() throws IOException { ArrayList streams = new ArrayList(); xrefObj = new ArrayList(xref.length / 2); xrefObj.addAll(Collections.nCopies(xref.length / 2, null)); for (int k = 2; k < xref.length; k += 2) { int pos = xref[k]; if (pos <= 0 || xref[k + 1] > 0) continue; tokens.seek(pos); tokens.nextValidToken(); if (tokens.getTokenType() != PRTokeniser.TK_NUMBER) tokens.throwError("Invalid object number."); objNum = tokens.intValue(); tokens.nextValidToken(); if (tokens.getTokenType() != PRTokeniser.TK_NUMBER) tokens.throwError("Invalid generation number."); objGen = tokens.intValue(); tokens.nextValidToken(); if (!tokens.getStringValue().equals("obj")) tokens.throwError("Token 'obj' expected."); PdfObject obj; try { obj = readPRObject(); if (obj.isStream()) { streams.add(obj); } } catch (Exception e) { obj = null; } xrefObj.set(k / 2, obj); } for (int k = 0; k < streams.size(); ++k) { checkPRStreamLength((PRStream)streams.get(k)); } readDecryptedDocObj(); if (objStmMark != null) { for (Iterator i = objStmMark.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry)i.next(); int n = ((Integer)entry.getKey()).intValue(); IntHashtable h = (IntHashtable)entry.getValue(); readObjStm((PRStream)xrefObj.get(n), h); xrefObj.set(n, null); } objStmMark = null; } xref = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readDocObj File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
readDocObj
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
@Override public int getActiveTransactionCount() { int rc = 0; for (TransportConnectionState cs : connectionStateRegister.listConnectionStates()) { Collection<TransactionState> transactions = cs.getTransactionStates(); for (TransactionState transaction : transactions) { rc++; } } return rc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActiveTransactionCount File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
getActiveTransactionCount
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
private void applyMovementMethodIfNeed(@NonNull TextView textView) { final CharSequence message = textView.getText(); if (TextUtils.isEmpty(message)) { return; } final SpannableStringBuilder ssb = new SpannableStringBuilder(message); final ClickableSpan[] spans = ssb.getSpans(0, ssb.length(), ClickableSpan.class); if (ArrayUtils.isEmpty(spans)) { return; } textView.setMovementMethod(LinkMovementMethod.getInstance()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: applyMovementMethodIfNeed File: services/autofill/java/com/android/server/autofill/ui/SaveUi.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-610" ]
CVE-2023-40133
MEDIUM
5.5
android
applyMovementMethodIfNeed
services/autofill/java/com/android/server/autofill/ui/SaveUi.java
08becc8c600f14c5529115cc1a1e0c97cd503f33
0
Analyze the following code function for security vulnerabilities
public void resizeTask(int taskId, Rect bounds) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resizeTask File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
resizeTask
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void run() { while (true) { byte[] msg; synchronized (asynchronousQueue) { if (asynchronousQueue.size() == 0) { /* After the queue is empty for about 2 seconds, stop this thread */ try { asynchronousQueue.wait(2000); } catch (InterruptedException e) { /* OKOK, if somebody interrupts us, then we may die earlier. */ } if (asynchronousQueue.size() == 0) { asynchronousThread = null; return; } } msg = asynchronousQueue.remove(0); } /* The following invocation may throw an IOException. * There is no point in handling it - it simply means * that the connection has a problem and we should stop * sending asynchronously messages. We do not need to signal that * we have exited (asynchronousThread = null): further * messages in the queue cannot be sent by this or any * other thread. * Other threads will sooner or later (when receiving or * sending the next message) get the same IOException and * get to the same conclusion. */ try { sendMessage(msg); } catch (IOException e) { return; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: run File: src/main/java/com/trilead/ssh2/transport/TransportManager.java Repository: connectbot/sshlib The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
run
src/main/java/com/trilead/ssh2/transport/TransportManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
0
Analyze the following code function for security vulnerabilities
@Override public boolean contains(K name) { return get(name) != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: contains File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
contains
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public void setSubscriptionCreationTimeInMillis(long subscriptionCreationTimeInMillis) { mSubscriptionCreationTimeInMillis = subscriptionCreationTimeInMillis; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSubscriptionCreationTimeInMillis File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
setSubscriptionCreationTimeInMillis
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
public void validateAdminOperationOnTopic(boolean authoritative) { validateAdminAccessForTenant(topicName.getTenant()); validateTopicOwnership(topicName, authoritative); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateAdminOperationOnTopic File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
validateAdminOperationOnTopic
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
final void checkExcessivePowerUsageLocked() { updateCpuStatsNow(); BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); boolean doCpuKills = true; if (mLastPowerCheckUptime == 0) { doCpuKills = false; } final long curUptime = SystemClock.uptimeMillis(); final long uptimeSince = curUptime - mLastPowerCheckUptime; mLastPowerCheckUptime = curUptime; int i = mLruProcesses.size(); while (i > 0) { i--; ProcessRecord app = mLruProcesses.get(i); if (app.setProcState >= ActivityManager.PROCESS_STATE_HOME) { if (app.lastCpuTime <= 0) { continue; } long cputimeUsed = app.curCpuTime - app.lastCpuTime; if (DEBUG_POWER) { StringBuilder sb = new StringBuilder(128); sb.append("CPU for "); app.toShortString(sb); sb.append(": over "); TimeUtils.formatDuration(uptimeSince, sb); sb.append(" used "); TimeUtils.formatDuration(cputimeUsed, sb); sb.append(" ("); sb.append((cputimeUsed*100)/uptimeSince); sb.append("%)"); Slog.i(TAG_POWER, sb.toString()); } // If the process has used too much CPU over the last duration, the // user probably doesn't want this, so kill! if (doCpuKills && uptimeSince > 0) { // What is the limit for this process? int cpuLimit; long checkDur = curUptime - app.whenUnimportant; if (checkDur <= mConstants.POWER_CHECK_INTERVAL) { cpuLimit = mConstants.POWER_CHECK_MAX_CPU_1; } else if (checkDur <= (mConstants.POWER_CHECK_INTERVAL*2) || app.setProcState <= ActivityManager.PROCESS_STATE_HOME) { cpuLimit = mConstants.POWER_CHECK_MAX_CPU_2; } else if (checkDur <= (mConstants.POWER_CHECK_INTERVAL*3)) { cpuLimit = mConstants.POWER_CHECK_MAX_CPU_3; } else { cpuLimit = mConstants.POWER_CHECK_MAX_CPU_4; } if (((cputimeUsed*100)/uptimeSince) >= cpuLimit) { synchronized (stats) { stats.reportExcessiveCpuLocked(app.info.uid, app.processName, uptimeSince, cputimeUsed); } app.kill("excessive cpu " + cputimeUsed + " during " + uptimeSince + " dur=" + checkDur + " limit=" + cpuLimit, true); app.baseProcessTracker.reportExcessiveCpu(app.pkgList); } } app.lastCpuTime = app.curCpuTime; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkExcessivePowerUsageLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
checkExcessivePowerUsageLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public AssetManager build() { // Retrieving the system ApkAssets forces their creation as well. final ApkAssets[] systemApkAssets = getSystem().getApkAssets(); // Filter ApkAssets so that assets provided by multiple loaders are only included once // in the AssetManager assets. The last appearance of the ApkAssets dictates its load // order. final ArrayList<ApkAssets> loaderApkAssets = new ArrayList<>(); final ArraySet<ApkAssets> uniqueLoaderApkAssets = new ArraySet<>(); for (int i = mLoaders.size() - 1; i >= 0; i--) { final List<ApkAssets> currentLoaderApkAssets = mLoaders.get(i).getApkAssets(); for (int j = currentLoaderApkAssets.size() - 1; j >= 0; j--) { final ApkAssets apkAssets = currentLoaderApkAssets.get(j); if (uniqueLoaderApkAssets.add(apkAssets)) { loaderApkAssets.add(0, apkAssets); } } } final int totalApkAssetCount = systemApkAssets.length + mUserApkAssets.size() + loaderApkAssets.size(); final ApkAssets[] apkAssets = new ApkAssets[totalApkAssetCount]; System.arraycopy(systemApkAssets, 0, apkAssets, 0, systemApkAssets.length); // Append user ApkAssets after system ApkAssets. for (int i = 0, n = mUserApkAssets.size(); i < n; i++) { apkAssets[i + systemApkAssets.length] = mUserApkAssets.get(i); } // Append ApkAssets provided by loaders to the end. for (int i = 0, n = loaderApkAssets.size(); i < n; i++) { apkAssets[i + systemApkAssets.length + mUserApkAssets.size()] = loaderApkAssets.get(i); } // Calling this constructor prevents creation of system ApkAssets, which we took care // of in this Builder. final AssetManager assetManager = new AssetManager(false /*sentinel*/); assetManager.mApkAssets = apkAssets; AssetManager.nativeSetApkAssets(assetManager.mObject, apkAssets, false /*invalidateCaches*/); assetManager.mLoaders = mLoaders.isEmpty() ? null : mLoaders.toArray(new ResourcesLoader[0]); return assetManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: build File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
build
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@Test public void testSerializationAsTimestamp03Milliseconds() throws Exception { Instant date = Instant.now(); String value = MAPPER.writer() .with(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .without(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS) .writeValueAsString(date); assertEquals("The value is not correct.", Long.toString(date.toEpochMilli()), value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testSerializationAsTimestamp03Milliseconds File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java Repository: FasterXML/jackson-modules-java8 The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testSerializationAsTimestamp03Milliseconds
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
0
Analyze the following code function for security vulnerabilities
@Nullable @Override public <E extends KrailEntity<ID, VER>> ID getIdentity(@Nonnull E entity) { return entity.getId(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIdentity File: src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java Repository: KrailOrg/krail-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-15018
MEDIUM
5.2
KrailOrg/krail-jpa
getIdentity
src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java
c1e848665492e21ef6cc9be443205e36b9a1f6be
0
Analyze the following code function for security vulnerabilities
public final void lightenPayload() { tickerView = null; contentView = null; bigContentView = null; headsUpContentView = null; mLargeIcon = null; if (extras != null && !extras.isEmpty()) { final Set<String> keyset = extras.keySet(); final int N = keyset.size(); final String[] keys = keyset.toArray(new String[N]); for (int i=0; i<N; i++) { final String key = keys[i]; if (TvExtender.EXTRA_TV_EXTENDER.equals(key)) { continue; } final Object obj = extras.get(key); if (obj != null && ( obj instanceof Parcelable || obj instanceof Parcelable[] || obj instanceof SparseArray || obj instanceof ArrayList)) { extras.remove(key); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: lightenPayload File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
lightenPayload
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public void writeI64(long i64) throws TException { writeVarint64(longToZigzag(i64)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeI64 File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
writeI64
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
@Test public void select(TestContext context) { createNumbers(context, 1, 2, 3) .select("SELECT i FROM numbers WHERE i IN (1, 3, 5) ORDER BY i", context.asyncAssertSuccess(select -> { context.assertEquals("1, 3", intsAsString(select)); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: select File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
select
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private void handleUiResult(int resultCode, Bundle resultData) { switch (resultCode) { case UserSelectionDialogResult.RESULT_CODE_DIALOG_COMPLETE_WITH_SELECTION: mStatus = UiStatus.IN_PROGRESS; UserSelectionDialogResult selection = UserSelectionDialogResult .fromResultData(resultData); if (selection != null) { mCallbacks.onUiSelection(selection); } else { Slog.i(TAG, "No selection found in UI result"); } break; case UserSelectionDialogResult.RESULT_CODE_DIALOG_USER_CANCELED: mStatus = UiStatus.TERMINATED; mCallbacks.onUiCancellation(/* isUserCancellation= */ true); break; case UserSelectionDialogResult.RESULT_CODE_CANCELED_AND_LAUNCHED_SETTINGS: mStatus = UiStatus.TERMINATED; mCallbacks.onUiCancellation(/* isUserCancellation= */ false); break; case UserSelectionDialogResult.RESULT_CODE_DATA_PARSING_FAILURE: mStatus = UiStatus.TERMINATED; mCallbacks.onUiSelectorInvocationFailure(); break; default: mStatus = UiStatus.IN_PROGRESS; mCallbacks.onUiSelectorInvocationFailure(); break; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleUiResult File: services/credentials/java/com/android/server/credentials/CredentialManagerUi.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40076
MEDIUM
5.5
android
handleUiResult
services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
9b68987df85b681f9362a3cadca6496796d23bbc
0
Analyze the following code function for security vulnerabilities
private void initGlobalSettingsDefaultValForWearLocked(String key, int val) { initGlobalSettingsDefaultValForWearLocked(key, String.valueOf(val)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initGlobalSettingsDefaultValForWearLocked File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
initGlobalSettingsDefaultValForWearLocked
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
public void setPreferentialNetworkServiceEnabled(boolean enabled) { throwIfParentInstance("setPreferentialNetworkServiceEnabled"); PreferentialNetworkServiceConfig.Builder configBuilder = new PreferentialNetworkServiceConfig.Builder(); configBuilder.setEnabled(enabled); if (enabled) { configBuilder.setNetworkId(NET_ENTERPRISE_ID_1); } setPreferentialNetworkServiceConfigs(List.of(configBuilder.build())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPreferentialNetworkServiceEnabled File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setPreferentialNetworkServiceEnabled
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public ModuleAccess getModuleAccess() { checkTrusted(); Unsafe.getUnsafe0(); return Root.Secret.MACCESS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getModuleAccess File: api/src/main/java/io/github/karlatemp/unsafeaccessor/UnsafeAccess.java Repository: Karlatemp/UnsafeAccessor The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-31139
MEDIUM
4.3
Karlatemp/UnsafeAccessor
getModuleAccess
api/src/main/java/io/github/karlatemp/unsafeaccessor/UnsafeAccess.java
4ef83000184e8f13239a1ea2847ee401d81585fd
0
Analyze the following code function for security vulnerabilities
private void dispatchRequest(final HttpServerExchange exchange, final ServletRequestContext servletRequestContext, final ServletChain servletChain, final DispatcherType dispatcherType) throws Exception { servletRequestContext.setDispatcherType(dispatcherType); servletRequestContext.setCurrentServlet(servletChain); if (dispatcherType == DispatcherType.REQUEST || dispatcherType == DispatcherType.ASYNC) { firstRequestHandler.call(exchange, servletRequestContext); } else { next.handleRequest(exchange); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispatchRequest File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-862" ]
CVE-2019-10184
MEDIUM
5
undertow-io/undertow
dispatchRequest
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
d2715e3afa13f50deaa19643676816ce391551e9
0
Analyze the following code function for security vulnerabilities
public List<File> getDevelopmentFolders() { return developmentFolders; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDevelopmentFolders File: api/src/main/java/org/openmrs/ui/framework/resource/ModuleResourceProvider.java Repository: openmrs/openmrs-module-uiframework The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-24621
MEDIUM
6.5
openmrs/openmrs-module-uiframework
getDevelopmentFolders
api/src/main/java/org/openmrs/ui/framework/resource/ModuleResourceProvider.java
0422fa52c7eba3d96cce2936cb92897dca4b680a
0
Analyze the following code function for security vulnerabilities
@Override public PrettyLoggable<String, LogWatch> tailingLines(int withTailingLines) { return new PodOperationsImpl(getContext().withTailingLines(withTailingLines)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tailingLines File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java Repository: fabric8io/kubernetes-client The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-20218
MEDIUM
5.8
fabric8io/kubernetes-client
tailingLines
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
325d67cc80b73f049a5d0cea4917c1f2709a8d86
0
Analyze the following code function for security vulnerabilities
Object parseMessageFromBytes( ByteString bytes, ExtensionRegistryLite registry, Descriptors.FieldDescriptor descriptor, Message defaultInstance) throws IOException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseMessageFromBytes File: java/core/src/main/java/com/google/protobuf/MessageReflection.java Repository: protocolbuffers/protobuf The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-3509
HIGH
7.5
protocolbuffers/protobuf
parseMessageFromBytes
java/core/src/main/java/com/google/protobuf/MessageReflection.java
a3888f53317a8018e7a439bac4abeb8f3425d5e9
0
Analyze the following code function for security vulnerabilities
public Date getLockingDate() { try { XWikiLock lock = this.doc.getLock(getXWikiContext()); if (lock != null && !getXWikiContext().getUser().equals(lock.getUserName())) { return lock.getDate(); } else { return null; } } catch (XWikiException e) { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLockingDate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getLockingDate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
public void setOCEventDataAuditsTypesExpected() { this.unsetTypeExpected(); int i = 1; this.setTypeExpected(i, TypeNames.STRING); // study_subject_oid ++i; this.setTypeExpected(i, TypeNames.STRING); // definition_oid ++i; this.setTypeExpected(i, TypeNames.INT); // audit_id ++i; this.setTypeExpected(i, TypeNames.STRING); // name ++i; this.setTypeExpected(i, TypeNames.INT); // user_id ++i; this.setTypeExpected(i, TypeNames.TIMESTAMP); // audit_date ++i; this.setTypeExpected(i, TypeNames.STRING); // reason_for_change ++i; this.setTypeExpected(i, TypeNames.STRING); // old_value ++i; this.setTypeExpected(i, TypeNames.STRING); // new_value ++i; this.setTypeExpected(i, TypeNames.INT); // audit_log_event_type_id }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOCEventDataAuditsTypesExpected File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
setOCEventDataAuditsTypesExpected
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
private boolean mutateSystemSetting(String name, String value, int runAsUserId, int operation) { // overrideableByRestore = false as by default settings values shouldn't be overrideable by // restore. return mutateSystemSetting(name, value, runAsUserId, operation, /* overrideableByRestore */ false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mutateSystemSetting File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
mutateSystemSetting
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
private Map<String, String> readMapFile(String filename) throws Exception { Map<String, String> myHash = new HashMap<String, String>(); BufferedReader is = null; try { is = new BufferedReader(new FileReader(filename)); String line; while ((line = is.readLine()) != null) { String myFile; String myHandle; // a line should be archive filename<whitespace>handle StringTokenizer st = new StringTokenizer(line); if (st.hasMoreTokens()) { myFile = st.nextToken(); } else { throw new Exception("Bad mapfile line:\n" + line); } if (st.hasMoreTokens()) { myHandle = st.nextToken(); } else { throw new Exception("Bad mapfile line:\n" + line); } myHash.put(myFile, myHandle); } } finally { if (is != null) { is.close(); } } return myHash; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readMapFile File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java Repository: DSpace The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-31195
HIGH
7.2
DSpace
readMapFile
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
56e76049185bbd87c994128a9d77735ad7af0199
0
Analyze the following code function for security vulnerabilities
private native void nativeLoadUrl( long nativeContentViewCoreImpl, String url, int loadUrlType, int transitionType, String referrerUrl, int referrerPolicy, int uaOverrideOption, String extraHeaders, byte[] postData, String baseUrlForDataUrl, String virtualUrlForDataUrl, boolean canLoadLocalResources);
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2014-3159 - Severity: MEDIUM - CVSS Score: 6.4 Description: Use LoadURLWithParams in ChromeWebContentsDelegateAndroid Build a LoadURLParams object from the OpenURLParams and properly set all parameters on that object when calling into NavigationController. This makes sure we set the correct state for the load. BUG=352083 Review URL: https://codereview.chromium.org/267253007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273865 0039d316-1c4b-4281-b951-d872f2087c98 Function: nativeLoadUrl File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium Fixed Code: private native void nativeLoadUrl( long nativeContentViewCoreImpl, String url, int loadUrlType, int transitionType, String referrerUrl, int referrerPolicy, int uaOverrideOption, String extraHeaders, byte[] postData, String baseUrlForDataUrl, String virtualUrlForDataUrl, boolean canLoadLocalResources, boolean isRendererInitiated);
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
nativeLoadUrl
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
1
Analyze the following code function for security vulnerabilities
public JSONObject increment(String key) throws JSONException { Object value = this.opt(key); if (value == null) { this.put(key, 1); } else if (value instanceof Integer) { this.put(key, ((Integer) value).intValue() + 1); } else if (value instanceof Long) { this.put(key, ((Long) value).longValue() + 1L); } else if (value instanceof BigInteger) { this.put(key, ((BigInteger)value).add(BigInteger.ONE)); } else if (value instanceof Float) { this.put(key, ((Float) value).floatValue() + 1.0f); } else if (value instanceof Double) { this.put(key, ((Double) value).doubleValue() + 1.0d); } else if (value instanceof BigDecimal) { this.put(key, ((BigDecimal)value).add(BigDecimal.ONE)); } else { throw new JSONException("Unable to increment [" + quote(key) + "]."); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: increment File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
increment
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
public boolean isHidden(String file) { file = removeFilePrefix(file); return new File(file).isHidden(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isHidden File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
isHidden
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public int compare(ThreadInfo a, ThreadInfo b) { int result = compare(a.getThreadId(), b.getThreadId()); if (result == 0) result = a.getThreadName().compareToIgnoreCase(b.getThreadName()); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compare File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
compare
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
@Override public List<String> getPermittedCrossProfileNotificationListeners(ComponentName who) { if (!mHasFeature) { return null; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallAuthorization( isDeviceOwner(caller) || isProfileOwner(caller)); synchronized (getLockObject()) { // API contract is to return null if there are no permitted cross-profile notification // listeners, including in Device Owner mode. ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller.getUserId()); return admin.permittedNotificationListeners; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPermittedCrossProfileNotificationListeners File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getPermittedCrossProfileNotificationListeners
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public boolean profileControl(String process, int userId, boolean start, ProfilerInfo profilerInfo, int profileType) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: profileControl File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
profileControl
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Override public int startVoiceActivity(String callingPackage, int callingPid, int callingUid, Intent intent, String resolvedType, IVoiceInteractionSession session, IVoiceInteractor interactor, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId) { if (checkCallingPermission(Manifest.permission.BIND_VOICE_INTERACTION) != PackageManager.PERMISSION_GRANTED) { String msg = "Permission Denial: startVoiceActivity() from pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid() + " requires " + android.Manifest.permission.BIND_VOICE_INTERACTION; Slog.w(TAG, msg); throw new SecurityException(msg); } if (session == null || interactor == null) { throw new NullPointerException("null session or interactor"); } userId = mUserController.handleIncomingUser(callingPid, callingUid, userId, false, ALLOW_FULL_ONLY, "startVoiceActivity", null); // TODO: Switch to user app stacks here. return mActivityStarter.startActivityMayWait(null, callingUid, callingPackage, intent, resolvedType, session, interactor, null, null, 0, startFlags, profilerInfo, null, null, bOptions, false, userId, null, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startVoiceActivity File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
startVoiceActivity
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public static Material filteredHgMaterial(String pattern) { HgMaterial material = hgMaterial(); material.setFilter(new Filter(new IgnoredFiles(pattern))); return material; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: filteredHgMaterial File: domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
filteredHgMaterial
domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
public void endOfAtRule() { style.endOfAtRule(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endOfAtRule File: org/w3c/css/css/StyleSheetParser.java Repository: w3c/css-validator The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-4070
LOW
3.5
w3c/css-validator
endOfAtRule
org/w3c/css/css/StyleSheetParser.java
e5c09a9119167d3064db786d5f00d730b584a53b
0
Analyze the following code function for security vulnerabilities
@Override public boolean isServerSocketAvailable() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isServerSocketAvailable File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
isServerSocketAvailable
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public static PostgresClient getInstance(Vertx vertx, String tenantId) { if (DEFAULT_SCHEMA.equals(tenantId)) { throw new IllegalArgumentException("tenantId must not be default schema " + DEFAULT_SCHEMA); } return getInstanceInternal(vertx, tenantId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInstance File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
getInstance
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private void ensureCapacity(int capacity) { if (capacity == 0) return; int oldCapacity = usingBytes ? bcdBytes.length : 0; if (!usingBytes) { bcdBytes = new byte[capacity]; } else if (oldCapacity < capacity) { byte[] bcd1 = new byte[capacity * 2]; System.arraycopy(bcdBytes, 0, bcd1, 0, oldCapacity); bcdBytes = bcd1; } usingBytes = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureCapacity File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java Repository: unicode-org/icu The code follows secure coding practices.
[ "CWE-190" ]
CVE-2018-18928
HIGH
7.5
unicode-org/icu
ensureCapacity
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
0
Analyze the following code function for security vulnerabilities
@Override public void notifyCleartextNetwork(int uid, byte[] firstPacket) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(uid); data.writeByteArray(firstPacket); mRemote.transact(NOTIFY_CLEARTEXT_NETWORK_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyCleartextNetwork File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
notifyCleartextNetwork
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private boolean checkNeedCertValidation() { debug("JSSEngine: checkNeedCertValidation()"); if (task != null) { if (!task.finished) { // Already created runnable task; exit with true status to // show it still needs to be run. debug("JSSEngine: checkNeedCertValidation() - task not done"); return true; } debug("JSSEngine: checkNeedCertValidation() - task done with code " + task.result); // Since the task has finished, we now need to inform NSS about // the results of our certificate validation step. if (SSL.AuthCertificateComplete(ssl_fd, task.result) != SSL.SECSuccess) { String msg = "Got unexpected failure finishing cert "; msg += "authentication in NSS. Returned code "; msg += task.result; throw new RuntimeException(msg); } // After checking certificates, our best guess will be that we // need to run wrap again. This is because we either need to // inform the caller of an error that occurred, or continue the // handshake. Worst case, we'll call updateHandshakeState() and // it'll correct our mistake eventually. debug("JSSEngine: checkNeedCertValidation() - task done, removing"); task = null; handshake_state = SSLEngineResult.HandshakeStatus.NEED_WRAP; ssl_fd.needCertValidation = false; return false; } if (ssl_fd == null) { // If we don't have a SSLFDProxy instance, nothing we can do but // skip checking if the task exists. Return false to show that // we don't yet have a runnable task. debug("JSSEngine: checkNeedCertValidation() - no ssl_fd"); return false; } if (!ssl_fd.needCertValidation) { // We don't yet need certificate validation. Don't create a // runnable task for now. debug("JSSEngine: checkNeedCertValidation() - no need for cert validation"); return false; } debug("JSSEngine: checkNeedCertValidation() - creating task"); // OK, time to create our runnable task. task = new CertValidationTask(ssl_fd); // Update our handshake state so we know what to do next. handshake_state = SSLEngineResult.HandshakeStatus.NEED_TASK; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkNeedCertValidation File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java Repository: dogtagpki/jss The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-4213
HIGH
7.5
dogtagpki/jss
checkNeedCertValidation
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
5922560a78d0dee61af8a33cc9cfbf4cfa291448
0
Analyze the following code function for security vulnerabilities
@Override public boolean finishActivityAffinity(IBinder token) { synchronized(this) { final long origId = Binder.clearCallingIdentity(); try { ActivityRecord r = ActivityRecord.isInStackLocked(token); if (r == null) { return false; } // Do not allow task to finish if last task in lockTask mode. Launchable priv-apps // can finish. final TaskRecord task = r.task; if (task.mLockTaskAuth != LOCK_TASK_AUTH_LAUNCHABLE_PRIV && mStackSupervisor.isLastLockedTask(task) && task.getRootActivity() == r) { mStackSupervisor.showLockTaskToast(); return false; } return task.stack.finishActivityAffinityLocked(r); } finally { Binder.restoreCallingIdentity(origId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishActivityAffinity File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
finishActivityAffinity
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Override public boolean matches(String name, String regex) { if (regex.startsWith("/")) { regex = regex.substring(1); } return name.matches(regex); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: matches File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
matches
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
@TestApi @RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS) public void clearOrganizationId() { if (mService == null) { return; } try { mService.clearOrganizationIdForUser(myUserId()); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearOrganizationId File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
clearOrganizationId
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void enableTrustOnFirstUse(int networkId, boolean enable) { WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId); if (internalConfig == null) return; if (!internalConfig.isEnterprise()) return; if (!internalConfig.enterpriseConfig.isEapMethodServerCertUsed()) return; internalConfig.enterpriseConfig.enableTrustOnFirstUse(enable); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableTrustOnFirstUse File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
enableTrustOnFirstUse
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private void handleCreateConnectionComplete( String callId, ConnectionRequest request, ParcelableConnection connection) { // TODO: Note we are not using parameter "request", which is a side effect of our tacit // assumption that we have at most one outgoing connection attempt per ConnectionService. // This may not continue to be the case. if (connection.getState() == Connection.STATE_DISCONNECTED) { // A connection that begins in the DISCONNECTED state is an indication of // failure to connect; we handle all failures uniformly Call foundCall = mCallIdMapper.getCall(callId); if (foundCall != null) { if (connection.getConnectTimeMillis() != 0) { foundCall.setConnectTimeMillis(connection.getConnectTimeMillis()); } // The post-dial digits are created when the call is first created. Normally // the ConnectionService is responsible for stripping them from the address, but // since a failed connection will not have done this, we could end up with duplicate // post-dial digits. foundCall.clearPostDialDigits(); } removeCall(callId, connection.getDisconnectCause()); } else { // Successful connection if (mPendingResponses.containsKey(callId)) { mPendingResponses.remove(callId) .handleCreateConnectionSuccess(mCallIdMapper, connection); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleCreateConnectionComplete File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
handleCreateConnectionComplete
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public static byte[] ASCII85Decode(byte in[]) { ByteArrayOutputStream out = new ByteArrayOutputStream(); int state = 0; int chn[] = new int[5]; for (int k = 0; k < in.length; ++k) { int ch = in[k] & 0xff; if (ch == '~') break; if (PRTokeniser.isWhitespace(ch)) continue; if (ch == 'z' && state == 0) { out.write(0); out.write(0); out.write(0); out.write(0); continue; } if (ch < '!' || ch > 'u') throw new RuntimeException("Illegal character in ASCII85Decode."); chn[state] = ch - '!'; ++state; if (state == 5) { state = 0; int r = 0; for (int j = 0; j < 5; ++j) r = r * 85 + chn[j]; out.write((byte)(r >> 24)); out.write((byte)(r >> 16)); out.write((byte)(r >> 8)); out.write((byte)r); } } int r = 0; // We'll ignore the next two lines for the sake of perpetuating broken PDFs // if (state == 1) // throw new RuntimeException("Illegal length in ASCII85Decode."); if (state == 2) { r = chn[0] * 85 * 85 * 85 * 85 + chn[1] * 85 * 85 * 85 + 85 * 85 * 85 + 85 * 85 + 85; out.write((byte)(r >> 24)); } else if (state == 3) { r = chn[0] * 85 * 85 * 85 * 85 + chn[1] * 85 * 85 * 85 + chn[2] * 85 * 85 + 85 * 85 + 85; out.write((byte)(r >> 24)); out.write((byte)(r >> 16)); } else if (state == 4) { r = chn[0] * 85 * 85 * 85 * 85 + chn[1] * 85 * 85 * 85 + chn[2] * 85 * 85 + chn[3] * 85 + 85; out.write((byte)(r >> 24)); out.write((byte)(r >> 16)); out.write((byte)(r >> 8)); } return out.toByteArray(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ASCII85Decode File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
ASCII85Decode
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
private void init(byte[] salt, byte[] passwordVerifier, char[] password, AESExtraDataRecord aesExtraDataRecord, boolean useUtf8ForPassword) throws ZipException { if (password == null || password.length <= 0) { throw new ZipException("empty or null password provided for AES decryption", WRONG_PASSWORD); } final AesKeyStrength aesKeyStrength = aesExtraDataRecord.getAesKeyStrength(); final byte[] derivedKey = AesCipherUtil.derivePasswordBasedKey(salt, password, aesKeyStrength, useUtf8ForPassword); final byte[] derivedPasswordVerifier = AesCipherUtil.derivePasswordVerifier(derivedKey, aesKeyStrength); if (!Arrays.equals(passwordVerifier, derivedPasswordVerifier)) { throw new ZipException("Wrong Password", ZipException.Type.WRONG_PASSWORD); } aesEngine = AesCipherUtil.getAESEngine(derivedKey, aesKeyStrength); mac = AesCipherUtil.getMacBasedPRF(derivedKey, aesKeyStrength); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init File: src/main/java/net/lingala/zip4j/crypto/AESDecrypter.java Repository: srikanth-lingala/zip4j The code follows secure coding practices.
[ "CWE-346" ]
CVE-2023-22899
MEDIUM
5.9
srikanth-lingala/zip4j
init
src/main/java/net/lingala/zip4j/crypto/AESDecrypter.java
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
0
Analyze the following code function for security vulnerabilities
@Override public void setSelected(boolean selected) { super.setSelected(selected); if (selected && !isInTouchMode()) { mSuggestionDelegate.onSetUrlToSuggestion(mSuggestion); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSelected File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
setSelected
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
@Override public IssueTemplateDao getThirdPartTemplate() {return null;}
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getThirdPartTemplate File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
getThirdPartTemplate
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
public boolean checkMultipleInstancesAccess(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (!isMultipleInstancesAdmin(request)) { // Activity log UserActivity.log(request.getRemoteUser(), "ADMIN_ACCESS_DENIED", request.getRequestURI(), null, request.getQueryString()); AccessDeniedException ade = new AccessDeniedException("You should not access this resource"); sendErrorRedirect(request, response, ade); return false; } else { return true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkMultipleInstancesAccess File: src/main/java/com/openkm/servlet/admin/BaseServlet.java Repository: openkm/document-management-system The code follows secure coding practices.
[ "CWE-79" ]
CVE-2021-3628
LOW
3.5
openkm/document-management-system
checkMultipleInstancesAccess
src/main/java/com/openkm/servlet/admin/BaseServlet.java
c96f2e33adab3bbf550977b1b62acaa54f86fa03
0
Analyze the following code function for security vulnerabilities
public Set<String> getTreatBaseUrlsAsLocal() { return myModelConfig.getTreatBaseUrlsAsLocal(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTreatBaseUrlsAsLocal File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
getTreatBaseUrlsAsLocal
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public static void setMemory(long address, long bytes, byte value) { PlatformDependent0.setMemory(address, bytes, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMemory File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
setMemory
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
@Override public void setInitialDisplaySize(Display display, int width, int height, int density) { // This method might be called before the policy has been fully initialized // or for other displays we don't care about. if (mContext == null || display.getDisplayId() != Display.DEFAULT_DISPLAY) { return; } mDisplay = display; final Resources res = mContext.getResources(); int shortSize, longSize; if (width > height) { shortSize = height; longSize = width; mLandscapeRotation = Surface.ROTATION_0; mSeascapeRotation = Surface.ROTATION_180; if (res.getBoolean(com.android.internal.R.bool.config_reverseDefaultRotation)) { mPortraitRotation = Surface.ROTATION_90; mUpsideDownRotation = Surface.ROTATION_270; } else { mPortraitRotation = Surface.ROTATION_270; mUpsideDownRotation = Surface.ROTATION_90; } } else { shortSize = width; longSize = height; mPortraitRotation = Surface.ROTATION_0; mUpsideDownRotation = Surface.ROTATION_180; if (res.getBoolean(com.android.internal.R.bool.config_reverseDefaultRotation)) { mLandscapeRotation = Surface.ROTATION_270; mSeascapeRotation = Surface.ROTATION_90; } else { mLandscapeRotation = Surface.ROTATION_90; mSeascapeRotation = Surface.ROTATION_270; } } mStatusBarHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_height); // Height of the navigation bar when presented horizontally at bottom mNavigationBarHeightForRotation[mPortraitRotation] = mNavigationBarHeightForRotation[mUpsideDownRotation] = res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_height); mNavigationBarHeightForRotation[mLandscapeRotation] = mNavigationBarHeightForRotation[mSeascapeRotation] = res.getDimensionPixelSize( com.android.internal.R.dimen.navigation_bar_height_landscape); // Width of the navigation bar when presented vertically along one side mNavigationBarWidthForRotation[mPortraitRotation] = mNavigationBarWidthForRotation[mUpsideDownRotation] = mNavigationBarWidthForRotation[mLandscapeRotation] = mNavigationBarWidthForRotation[mSeascapeRotation] = res.getDimensionPixelSize(com.android.internal.R.dimen.navigation_bar_width); // SystemUI (status bar) layout policy int shortSizeDp = shortSize * DisplayMetrics.DENSITY_DEFAULT / density; int longSizeDp = longSize * DisplayMetrics.DENSITY_DEFAULT / density; // Allow the navigation bar to move on small devices (phones). mNavigationBarCanMove = shortSizeDp < 600; mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar); // Allow a system property to override this. Used by the emulator. // See also hasNavigationBar(). String navBarOverride = SystemProperties.get("qemu.hw.mainkeys"); if ("1".equals(navBarOverride)) { mHasNavigationBar = false; } else if ("0".equals(navBarOverride)) { mHasNavigationBar = true; } // For demo purposes, allow the rotation of the HDMI display to be controlled. // By default, HDMI locks rotation to landscape. if ("portrait".equals(SystemProperties.get("persist.demo.hdmirotation"))) { mDemoHdmiRotation = mPortraitRotation; } else { mDemoHdmiRotation = mLandscapeRotation; } mDemoHdmiRotationLock = SystemProperties.getBoolean("persist.demo.hdmirotationlock", false); // For demo purposes, allow the rotation of the remote display to be controlled. // By default, remote display locks rotation to landscape. if ("portrait".equals(SystemProperties.get("persist.demo.remoterotation"))) { mDemoRotation = mPortraitRotation; } else { mDemoRotation = mLandscapeRotation; } mDemoRotationLock = SystemProperties.getBoolean( "persist.demo.rotationlock", false); // Only force the default orientation if the screen is xlarge, at least 960dp x 720dp, per // http://developer.android.com/guide/practices/screens_support.html#range mForceDefaultOrientation = longSizeDp >= 960 && shortSizeDp >= 720 && res.getBoolean(com.android.internal.R.bool.config_forceDefaultOrientation) && // For debug purposes the next line turns this feature off with: // $ adb shell setprop config.override_forced_orient true // $ adb shell wm size reset !"true".equals(SystemProperties.get("config.override_forced_orient")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setInitialDisplaySize File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
setInitialDisplaySize
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
@Test public void upsert4(TestContext context) { String id = randomUuid(); PostgresClient postgresClient = createFoo(context); postgresClient.upsert(FOO, id, xPojo, context.asyncAssertSuccess(save -> { context.assertEquals(id, save); postgresClient.getById(FOO, id, context.asyncAssertSuccess(get -> { context.assertEquals("x", get.getString("key")); postgresClient.upsert(FOO, id, singleQuotePojo, context.asyncAssertSuccess(update -> { context.assertEquals(id, update); postgresClient.getById(FOO, id, context.asyncAssertSuccess(get2 -> { context.assertEquals("'", get2.getString("key")); })); })); })); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: upsert4 File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
upsert4
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@Override public boolean requestAssistContextExtras(int requestType, IAssistDataReceiver receiver, Bundle receiverExtras, IBinder activityToken, boolean focused, boolean newSessionId) { return enqueueAssistContext(requestType, null, null, receiver, receiverExtras, activityToken, focused, newSessionId, UserHandle.getCallingUserId(), null, PENDING_ASSIST_EXTRAS_LONG_TIMEOUT, 0) != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestAssistContextExtras File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
requestAssistContextExtras
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
void requestRedrawForSync() { mRedrawForSyncReported = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestRedrawForSync File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
requestRedrawForSync
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public TimeZone getTimeZone() { return timeZone; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTimeZone File: src/main/java/org/projectforge/web/admin/SetupForm.java Repository: micromata/projectforge-webapp The code follows secure coding practices.
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
getTimeZone
src/main/java/org/projectforge/web/admin/SetupForm.java
422de35e3c3141e418a73bfb39b430d5fd74077e
0
Analyze the following code function for security vulnerabilities
public void setStatusBasedReindexingDisabled(boolean theStatusBasedReindexingDisabled) { myStatusBasedReindexingDisabled = theStatusBasedReindexingDisabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setStatusBasedReindexingDisabled File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
setStatusBasedReindexingDisabled
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public String getUsername() { return username; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUsername File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/LetsChatNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
getUsername
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/LetsChatNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
public static TProtocolFactory guessProtocolFactory(byte[] data, TProtocolFactory fallback) { // // If the first and last bytes are opening/closing curly braces we guess the protocol as // being TJSONProtocol. // It could not be a TCompactBinary encoding for a field of type 0xb (Map) // with delta id 7 as the last byte for TCompactBinary is always 0. // if ('{' == data[0] && '}' == data[data.length - 1]) { return new TJSONProtocol.Factory(); } // // If the last byte is not 0, then it cannot be TCompactProtocol, it must be // TBinaryProtocol. // if (data[data.length - 1] != 0) { return new TBinaryProtocol.Factory(); } // // A first byte of value > 16 indicates TCompactProtocol was used, and the first byte // encodes a delta field id (id <= 15) and a field type. // if (data[0] > 0x10) { return new TCompactProtocol.Factory(); } // // If the second byte is 0 then it is a field id < 256 encoded by TBinaryProtocol. // It cannot possibly be TCompactProtocol since a value of 0 would imply a field id // of 0 as the zig zag varint encoding would end. // if (data.length > 1 && 0 == data[1]) { return new TBinaryProtocol.Factory(); } // // If bit 7 of the first byte of the field id is set then we have two choices: // 1. A field id > 63 was encoded with TCompactProtocol. // 2. A field id > 0x7fff (32767) was encoded with TBinaryProtocol and the last byte of the // serialized data is 0. // Option 2 is impossible since field ids are short and thus limited to 32767. // if (data.length > 1 && (data[1] & 0x80) != 0) { return new TCompactProtocol.Factory(); } // // The remaining case is either a field id <= 63 encoded as TCompactProtocol, // one >= 256 encoded with TBinaryProtocol with a last byte at 0, or an empty structure. // As we cannot really decide, we return the fallback protocol. // return fallback; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: guessProtocolFactory File: thrift/lib/java/thrift/src/main/java/com/facebook/thrift/protocol/TProtocolUtil.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-755" ]
CVE-2019-3559
MEDIUM
5
facebook/fbthrift
guessProtocolFactory
thrift/lib/java/thrift/src/main/java/com/facebook/thrift/protocol/TProtocolUtil.java
a56346ceacad28bf470017a6bda1d5518d0bd943
0
Analyze the following code function for security vulnerabilities
@Override public synchronized void save() throws IOException { super.save(); updateTransientActions(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: save File: core/src/main/java/hudson/model/AbstractProject.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
save
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
@Override public void setJMSType(String type) throws JMSException { this.setStringProperty(JMS_MESSAGE_TYPE, type); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setJMSType File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
setJMSType
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
public Attachment toRestAttachment(URI baseUri, com.xpn.xwiki.api.Attachment xwikiAttachment, Boolean withPrettyNames, boolean versionURL) { XWikiContext xcontext = this.xcontextProvider.get(); String relativeURL = xcontext.getWiki().getURL(xwikiAttachment.getReference(), xcontext); String absoluteURL = xcontext.getWiki().getExternalAttachmentURL(xwikiAttachment.getDocument().getFullName(), xwikiAttachment.getFilename(), xcontext); return toRestAttachment(baseUri, xwikiAttachment, relativeURL, absoluteURL, withPrettyNames, versionURL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toRestAttachment File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-35151
HIGH
7.5
xwiki/xwiki-platform
toRestAttachment
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
824cd742ecf5439971247da11bfe7e0ad2b10ede
0
Analyze the following code function for security vulnerabilities
@Override public MediaPackage addAttachment(URI uri, MediaPackageElementFlavor flavor, MediaPackage mediaPackage) throws IOException, IngestException { Job job = null; try { job = serviceRegistry.createJob(JOB_TYPE, INGEST_ATTACHMENT_FROM_URI, Arrays.asList(uri.toString(), flavor.toString(), MediaPackageParser.getAsXml(mediaPackage)), null, false, ingestFileJobLoad); job.setStatus(Status.RUNNING); job = serviceRegistry.updateJob(job); String elementId = UUID.randomUUID().toString(); logger.info("Start adding attachment {} from URL {} on mediapackage {}", elementId, uri, mediaPackage); URI newUrl = addContentToRepo(mediaPackage, elementId, uri); MediaPackage mp = addContentToMediaPackage(mediaPackage, elementId, newUrl, MediaPackageElement.Type.Attachment, flavor); job.setStatus(Job.Status.FINISHED); logger.info("Successful added attachment {} on mediapackage {} at URL {}", elementId, mediaPackage, newUrl); return mp; } catch (ServiceRegistryException e) { throw new IngestException(e); } catch (NotFoundException e) { throw new IngestException("Unable to update ingest job", e); } finally { finallyUpdateJob(job); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAttachment File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-29237
MEDIUM
5.5
opencast
addAttachment
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
0
Analyze the following code function for security vulnerabilities
public Builder setMinIntervalMillis(Integer minIntervalMillis) { this.minIntervalMillis = minIntervalMillis; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMinIntervalMillis File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java Repository: lingochamp/FileDownloader The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-11248
HIGH
7.5
lingochamp/FileDownloader
setMinIntervalMillis
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
0
Analyze the following code function for security vulnerabilities
public void saveDocument(XWikiDocument doc, XWikiContext context) throws XWikiException { // If no comment is provided we should use an empty comment saveDocument(doc, "", context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveDocument File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
saveDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private HttpSession getSession() { HttpServletRequest request = this.getThreadLocalRequest(); HttpSession session = request.getSession(); log.debug("IP '{}', Session ID '{}'", request.getRemoteAddr(), session.getId()); //$NON-NLS-1$ return session; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSession File: frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java Repository: oVirt/ovirt-engine The code follows secure coding practices.
[ "CWE-287" ]
CVE-2024-0822
HIGH
7.5
oVirt/ovirt-engine
getSession
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
036f617316f6d7077cd213eb613eb4816e33d1fc
0
Analyze the following code function for security vulnerabilities
protected Client buildHttpClient() { // use the default client config if not yet initialized if (clientConfig == null) { clientConfig = getDefaultClientConfig(); } ClientBuilder clientBuilder = ClientBuilder.newBuilder(); customizeClientBuilder(clientBuilder); clientBuilder = clientBuilder.withConfig(clientConfig); return clientBuilder.build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildHttpClient File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
buildHttpClient
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void setContextualSearchClient(ContextualSearchClient contextualSearchClient) { mContextualSearchClient = contextualSearchClient; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setContextualSearchClient File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-1021" ]
CVE-2015-1241
MEDIUM
4.3
chromium
setContextualSearchClient
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
@Override public boolean enabledIn(int flags) { return (flags & _mask) != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enabledIn File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
enabledIn
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
public ContentProviderHolder getContentProvider(IApplicationThread caller, String name, int userId, boolean stable) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(caller != null ? caller.asBinder() : null); data.writeString(name); data.writeInt(userId); data.writeInt(stable ? 1 : 0); mRemote.transact(GET_CONTENT_PROVIDER_TRANSACTION, data, reply, 0); reply.readException(); int res = reply.readInt(); ContentProviderHolder cph = null; if (res != 0) { cph = ContentProviderHolder.CREATOR.createFromParcel(reply); } data.recycle(); reply.recycle(); return cph; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentProvider File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getContentProvider
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private void logCallbackException( String msg, ISessionControllerCallbackHolder holder, Exception e) { Log.v(TAG, msg + ", this=" + this + ", callback package=" + holder.mPackageName + ", exception=" + e); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logCallbackException File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
logCallbackException
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
public Builder addPerson(String uri) { addPerson(new Person.Builder().setUri(uri).build()); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPerson File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
addPerson
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public String getRefererText(String referer, XWikiContext context) { try { URL url = new URL(referer); Map<String, SearchEngineRule> searchengines = getSearchEngineRules(context); if (searchengines != null) { for (SearchEngineRule senginerule : searchengines.values()) { String host = url.getHost(); int i1 = host.indexOf(senginerule.getHost()); if (i1 != -1) { String query = context.getUtil().substitute(senginerule.getRegEx(), url.getQuery()); if ((query != null) && (!query.equals(""))) { // We return the query text instead of the full referer return host.substring(i1) + ":" + query; } } } } } catch (Exception e) { } String result = referer.substring(referer.indexOf("://") + 3); if (result.endsWith("/")) { return result.substring(0, result.length() - 1); } else { return result; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRefererText File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getRefererText
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private void updateEnterpriseThumbnailDrawable(Context context) { DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); mEnterpriseThumbnailDrawable = dpm.getResources().getDrawable( WORK_PROFILE_ICON, OUTLINE, PROFILE_SWITCH_ANIMATION, () -> context.getDrawable(R.drawable.ic_corp_badge)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateEnterpriseThumbnailDrawable File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
updateEnterpriseThumbnailDrawable
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public Iterable<DependencyFilter> getDependencyFilters() { return dependencyFilters; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDependencyFilters File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
getDependencyFilters
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0