| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin-developers/> |
| List-Post: | <mailto:cygwin-developers AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-developers-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin-developers AT sources DOT redhat DOT com |
| From: | Matt <matt AT use DOT net> |
| X-Sender: | matt AT cesium DOT clock DOT org |
| To: | cygwin-developers AT sources DOT redhat DOT com |
| Subject: | failed malloc()? |
| Message-ID: | <Pine.NEB.4.10.10011251517570.14159-100000@cesium.clock.org> |
| MIME-Version: | 1.0 |
| Date: | Sat, 25 Nov 2000 15:41:59 -0800 |
I've started reviewing some of the winsup code and had a question as to how to most properly correct unchecked pointers. That is, I know to add a statement to check the freshly created/passed pointer, but not what to do in the instance that pointer is NULL. Some places in the cygwin code do a system_printf() which is what I will assume is desired, but wanted to check to make sure what the standard/preferred way of handling such things is (if there is one). Here one of the sections of code I am looking at (cygcheck.c:91,92): paths[num_paths] = (char *) malloc (maxlen + 1); memcpy (paths[num_paths], s, maxlen);
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |