-
Notifications
You must be signed in to change notification settings - Fork 0
π‘οΈ Sentinel: μ λ ₯ κ²μ¦ μ μ μ μ€λ²νλ‘μ° λ°©μ§ (Integer overflow coercion vulnerability) #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,7 +141,7 @@ autoFIPC <- | |
| } | ||
| for (attempt in seq_len(3)) { | ||
| n <- readline(prompt = "Is it correct? (1: Yes 2: No) : ") | ||
| if (grepl("^[0-9]+$", n)) { | ||
| if (grepl("^[12]$", n)) { | ||
| return(as.integer(n)) | ||
|
Comment on lines
+144
to
145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Info: Stricter prompt regex changes retry behavior With Was this helpful? React with π or π to provide feedback. |
||
| } | ||
| } | ||
|
|
@@ -171,7 +171,7 @@ autoFIPC <- | |
| readline( | ||
| prompt = "Do you want to use default BILOG-MG priors for oldform Data? (1: Yes 2: No) : " | ||
| ) | ||
| if (grepl("^[0-9]+$", n)) { | ||
| if (grepl("^[12]$", n)) { | ||
| return(as.integer(n)) | ||
| } | ||
| } | ||
|
|
@@ -390,7 +390,7 @@ autoFIPC <- | |
| readline( | ||
| prompt = "Do you want to use default BILOG-MG priors for newform Data? (1: Yes 2: No) : " | ||
| ) | ||
| if (grepl("^[0-9]+$", n)) { | ||
| if (grepl("^[12]$", n)) { | ||
| return(as.integer(n)) | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Maintainability & Code Quality | π‘ Minor | β‘ Quick win
λ³κ²½λ μ λ ₯ κ²½λ‘μ νκ· ν μ€νΈλ₯Ό μΆκ°νμΈμ.
μ΄ λ³κ²½μ μΈ ν둬ννΈμ νμ© μ λ ₯μ λ³κ²½ν©λλ€. κ° κ²½λ‘μμ
1κ³Ό2λ₯Ό νμ©νκ³0,3,01, 곡백 ν¬ν¨ μ λ ₯, λ§€μ° κΈ΄ μ«μ λ¬Έμμ΄μ κ±°λΆνλ ν μ€νΈ λλ fixtureλ₯Ό μΆκ°νμΈμ. μ 곡λtests/testthat/test-autoFIPC.R:1-12λ λΉλνν μ€λ₯λ§ νμΈνλ―λ‘ λ³κ²½λreadline()κ²½λ‘λ₯Ό κ²μ¦νμ§ μμ΅λλ€.As per coding guidelines:
**/*: Add tests/fixtures first when behavior changes are required.Also applies to: 174-174, 393-393
π€ Prompt for AI Agents
Source: Coding guidelines