Forum Discussion
3 Replies
- Altera_Forum
Honored Contributor
I haven't done this myself, but in alt_main.c the arguments to main.c are passed.
What exactly are you trying to accomplish? If you're looking for input arguments, why not keep it simple and use scanf()?024: /* 025: * Standard arguments for main. By default, no arguments are passed to main. 026: * However a device driver may choose to configure these arguments by calling 027: * alt_set_args(). The expectation is that this facility will only be used by 028: * the iclient/ihost utility. 029: */ 030: 031: int alt_argc = 0; 032: char** alt_argv = {NULL}; 033: char** alt_envp = {NULL}; ... 116: main (alt_argc, alt_argv, alt_envp); - Altera_Forum
Honored Contributor
Hi, Thanks for the prompt reply. I will try it out.
I actually need to demonstrate buffer overflow attacks in embedded systems, which happens when you pass arguments with size more than the allotted memory. - Altera_Forum
Honored Contributor
I'm no security guru, but would a RPC suffice? Lots of embedded systems have TCP/IP stacks. I imagine RPCs are a simple way to control an embedded device.