Experienced PHP and C programmer based in Norway, with a history of game and web development. CTO at Blue Scarab Entertainment, previously at Servebolt.com, IMVU, Smarterphone, and Funcom.
You mention the C standard without citing it, and at least in one case, you're mistaken: It's not required that argv[0] is the name of the program, for example. Sometimes it's actually an empty string. ISO C11 says:
If the value of argc is greater than zero, the string pointed to by argv[0] represents the program name; argv[0][0] shall be the null character if the program name is not available from the host environment.
The Windows API for example has a function to let you get the program name: GetModuleFileName
I don't know if NULL-termination of argv is guaranteed, either - you should probably just use argc to find the end of the array.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You mention the C standard without citing it, and at least in one case, you're mistaken: It's not required that argv[0] is the name of the program, for example. Sometimes it's actually an empty string. ISO C11 says:
The Windows API for example has a function to let you get the program name: GetModuleFileName
I don't know if NULL-termination of argv is guaranteed, either - you should probably just use argc to find the end of the array.