OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Postfix Archives: (off-topic) Re: POP

(off-topic) Re: POP


Subject: (off-topic) Re: POP
From: Jeremy C. Reed (jcriwbc.net)
Date: Fri Jan 21 2000 - 13:44:16 CST


On Fri, 21 Jan 2000, Fabien Seisen wrote:

> Oh noo, not gnu-pop3d, it contains severals bugs.
> missing bound checkings, tests the return of malloc()'s , ...

I am trying to learn C.
I understand bound checking problems, but can you explain the bug of
"tests the return of malloc()'s"?

Is this bad? (An example from gnu-pop3d:)
apop.c:85: if ((password = malloc (sizeof (char) * APOP_DIGEST)) == NULL)

Or do you mean "not testing"?
extra.c:324: ret = malloc ((strlen (buf) + 1) * sizeof (char));
extra.c-325- strcpy (ret, buf);

Thanks,

Jeremy C. Reed
-----------------------------------------
                        IWBC ISP Services
                             jcriwbc.net



This archive was generated by hypermail 2b27 : Fri Jan 21 2000 - 13:46:51 CST