Hacker News new | past | comments | ask | show | jobs | submit login

I was wondering if it there is a _practical_ attack that stores the content of a file into a string, char array, etc..

Looks that it's not that easy unless the file is formatted in a special way:

https://stackoverflow.com/questions/410980/include-a-text-fi...

(sorry for the stack overflow link - my C/C+ is rusty to say politely)




If the output from the compiler is a binary object (.o) instead of the assembly (.s), I'd use gcc's inline assembly extension to call the GNU assembly ".incbin" directive (plus the necessary directives to put it in the correct section with an exported symbol).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: