Date: Thu, 8 Aug 2002 03:27:52 +0400 From: "Andrey A. Chernov" <ache@nagual.pp.ru> To: phk@freebsd.org, current@freebsd.org Subject: phk malloc() sometimes forget to set errno Message-ID: <20020807232750.GA1168@nagual.pp.ru>
next in thread | raw e-mail | index | archive | help
I found at least one case: -------------------------------------------- imalloc(...) ... if ((size + malloc_pagesize) < size) /* Check for overflow */ result = 0; ... return result; -------------------------------------------- I.e. NULL returned, but errno is not set and can be even 0 Please fix this bug. According to POSIX, ENOMEM is required at least, but EINVAL here is more applicable (as POSIX extension). -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020807232750.GA1168>