From: khan AT xraylith DOT wisc DOT edu (Mumit Khan) Subject: [patch#2] Handle NULL and empty pathnames 16 Nov 1998 00:17:27 -0800 Message-ID: References: <19981115183107 DOT 16554 AT cygnus DOT com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1915750185-1418950735-911203490=:24555" To: Geoffrey Noer Cc: cygwin32-developers AT cygnus DOT com This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime AT docserver DOT cac DOT washington DOT edu for more info. --1915750185-1418950735-911203490=:24555 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 15 Nov 1998, Geoffrey Noer wrote: > Committed. Thanks, I agree, checking for handling NULL pathnames is > probably a good idea... > Well, in that case, we should handle ``fopen (NULL, ...)'' as well. I hate SEGV violation in RTLs when there's way to tell the user there's a problem with their code. Patch attached. Regards, Mumit --1915750185-1418950735-911203490=:24555 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="syscalls.cc-diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: _open patch to handle NULL pathnames TW9uIE5vdiAxNiAwMTo1MTozMiAxOTk4ICBNdW1pdCBLaGFuICA8a2hhbkB4 cmF5bGl0aC53aXNjLmVkdT4NCg0KCSogc3lzY2FsbHMuY2MgKF9vcGVuKTog SGFuZGxlIE5VTEwgcGF0aG5hbWVzLg0KDQpJbmRleDogc3lzY2FsbHMuY2MN Cj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBmaWxlOiAvbW91bnRzL3Nk YjUvc3JjL2Nkay1iMjAvd2luc3VwLXNuYXBzaG90L0NWU1JPT1Qvd2luc3Vw L3N5c2NhbGxzLmNjLHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS4xLjEuMQ0K ZGlmZiAtdSAtMyAtcCAtcjEuMS4xLjEgc3lzY2FsbHMuY2MNCi0tLSBzeXNj YWxscy5jYwkxOTk4Lz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