Date: Sat, 14 Oct 1995 15:55:07 -0400 (EDT) From: John Capo <jc@irbs.com> To: freebsd-current@freefall.FreeBSD.org (freebsd-current) Subject: phkmalloc and X programs Message-ID: <199510141955.PAA12591@irbs.irbs.com>
next in thread | raw e-mail | index | archive | help
Here is another broken X program. Notice the assumption that malloc() returns zeroed memory. xhost.c: namelen = strlen(name); if ((lname = (char *)malloc(namelen)) == NULL) { fprintf (stderr, "%s: malloc bombed in change_host\n", ProgramName); exit (1); } for (i = 0; i < namelen; i++) { lname[i] = tolower(name[i]); } if (!strncmp("inet:", lname, 5)) { ... ... John Capo IRBS Engineering High performance FreeBSD systems
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510141955.PAA12591>