googleprojectzero / googleprojectzero/fuzzilli
may remove this assert
Open
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.3k
- Forks
- 367
- Avg merge
- 23h 53m
- Merged PRs (30d)
- 1
Description
/// Emit one line of code.
mutating func emit<S: StringProtocol>(_ line: S) {
assert(!line.contains("\n")) // <---------
currentLineNumber += 1
if includeLineNumbers { code += "\(String(format: "%3i", currentLineNumber)). " }
code += currentIndention + line + "\n"
}
sometimes, TemplateLiteral expression may contains multiples line, that assert seems not to must.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Sources/Fuzzilli/Lifting/ScriptWriter.swift at the emit function and its assertion on line contents. Trace how multiline TemplateLiteral expressions reach this function, then verify that valid multiline expressions are handled without the assertion while normal line emission remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100