question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support String.formatted with FormatString Bug Pattern

See original GitHub issue

Added in JDK 15 is the ability for callformatted on a String.

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html#formatted(java.lang.Object...)

"foo %s".formatted("bar");

It would be great if the https://errorprone.info/bugpattern/FormatString check was enforced on this.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
codylerumcommented, Jan 3, 2022

@Stephan202 Thanks for the pointers I went through and made intellij invalidate all it’s caches and it seems to be compiling now.

Intellij seems to frequently have issues when a dependency version changes and it doesn’t blow away the old one out of the build.

0reactions
codylerumcommented, Jan 4, 2022

Thanks @Stephan202 and @cushon

I was able to work up a PR that implements this which is now linked. Let me know if that direction works or if you want me to look at another way

Read more comments on GitHub >

github_iconTop Results From Across the Web

Format string attack - OWASP Foundation
The Format String exploit occurs when the submitted data of an input string is evaluated as a command by the application. In this...
Read more >
Format String Bug - Red Team Notes
Format String bug appears in programs written in C, which means this bug is applicable to all operating systems that have a C...
Read more >
Format String Vulnerability and Prevention with Example
Format string vulnerabilities are a class of bug that take ... we can see a repeating pattern of 0x252070 – those are our...
Read more >
A simple Format String exploit example - bin 0x11 - YouTube
Solving format1 from exploit-exercises.com with a simple Format String vulnerability, exploited with %n.stack layout: ...
Read more >
Introduction to format string exploits - Code Arcana
Format string vulnerabilities are a pretty silly class of bug that take advantage of an easily avoidable programmer error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found