Handling argc==0 in the kernel
Handling argc==0 in the kernel
Posted Jan 30, 2022 21:48 UTC (Sun) by developer122 (guest, #152928)In reply to: Handling argc==0 in the kernel by floppus
Parent article: Handling argc==0 in the kernel
I think changing argc from 0 to 1 and adding an empty string will probably trip up legitimate programs. If argc is 0, then they may handle that by not checking argv and all is well. If argc is one, then they may expect a valid entry in argv[0]. It's still not great to require a valid name in argv[0], but regardless of what vulnerabilities may exist already I can see this causing more breakage to programs that attempt to handle argc==0 correctly.
