4 ms·
Relying on argc instead of null termination is a bit more robust since the check will still work even if you skip entries for any reason.
by josefx 3y ago
Relying on argc instead of null termination is a bit more robust since the check will still work even if you skip entries for any reason.
- mort96 3y agoI agree that using argc is better than null termination, but I don't understand how any of the bugs related to argc==0 are about null termination. Note that the buggy code behind CVE-2021-4034 literally uses argc, not null termination.