Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Potential NPE fromMethodParameter.getMethod() check inKotlinDelegate.hasDefaultValue() #33609

Closed
Assignees
jhoeller
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug
Milestone
@openrefactorymunawar

Description

@openrefactorymunawar

Summary

In your repository (MAVENorg.springframework:spring-web @ 6.1.12), we have found a bug that may require your attention.

In file: AbstractNamedValueArgumentResolver.java, class: KotlinDelegate, method: hasDefaultValue, there is a potential Null pointer dereference at:

In other places of the code (e.g.,

or), the return value of thegetMethod method was checked for null value. But if we put it directly insideObjects.requireNonNull, we may have an exception.

A potential fix will be to replace the following line

Methodmethod =Objects.requireNonNull(parameter.getMethod());

with

Methodmethod =parameter.getMethod();if (method ==null) {returnfalse;}

Another option could be to useObjects.requireNonNullElse.

Sponsorship and Support

This work is done by the security researchers from OpenRefactory and is supported by theOpen Source Security Foundation (OpenSSF):Project Alpha-Omega. Alpha-Omega is a project partnering with open source software project maintainers to systematically find new, as-yet-undiscovered vulnerabilities in open source code - and get them fixed – to improve global software supply chain security.

The bug is found by running the Intelligent Code Repair (iCR) tool by OpenRefactory and then manually triaging the results.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp