Subject: NULL program argument checks?
To: None <tech-security@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-security
Date: 04/05/2006 23:10:53
Hi

I'm working on bugs found by Coverity, and I have this one:

int main (ac, av) 
...
        if (ac < 2)
                fatal error...

        id = av[1];

        len = strlen(id);

It complain because I have not checked id != NULL. Is it safe to assume
that if ac >= n, then av[n + 1] is not NULL? On NetBSD? Generally
speaking?

-- 
Emmanuel Dreyfus
Le cahier de l'admin BSD 2eme ed. est dans toutes les bonnes librairies
http://www.eyrolles.com/Informatique/Livre/9782212114638/livre-bsd.php
manu@netbsd.org