launch-code icon indicating copy to clipboard operation
launch-code copied to clipboard

Close the macro loophole

Open kmcallister opened this issue 11 years ago • 0 comments

Because we only sign the source text, you can write

macro_rules! loophole {
    () => (unsafe { /* anything */ })
}

#[launch_code="⣘⠖⡹⡄⣉⢈⢰⣡⠂⡘⡿⡛⣸⢀⢮⡆⡧⣙⠘⣷⠽⠨⣌⣗⣥⠆⢗⣹⢷⢰⡲⢴⠾⡢⠔⡈⢠⢶⡸⡬⠀⢽⠽⠮⠫⣉⢁⢶⠙⣬⡖⣚⠤⣁⢗⡟⢡⠻⣘⠞⢸⣱⢛⠄"]
fn main() {
    loophole!();
}

and change unsafe code without re-signing. Perhaps we need to sign both the source and the expanded AST.

kmcallister avatar Jan 14 '15 02:01 kmcallister