Change 13619 by jhi@alpha on 2001/12/11 13:51:21

        Subject: [patch perlio.c] test for NULL before derefencing
        From: Stas Bekman <[EMAIL PROTECTED]>
        Date: Tue, 11 Dec 2001 16:17:55 +0800
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

.... //depot/perl/perlio.c#146 edit

Differences ...

==== //depot/perl/perlio.c#146 (text) ====
Index: perl/perlio.c
--- perl/perlio.c.~1~   Tue Dec 11 07:00:05 2001
+++ perl/perlio.c       Tue Dec 11 07:00:05 2001
@@ -968,7 +968,7 @@
 {
     PerlIOl *l = NULL;
     Newc('L',l,tab->size,char,PerlIOl);
-    if (l) {
+    if (l && f) {
        Zero(l, tab->size, char);
        l->next = *f;
        l->tab = tab;
@@ -1052,7 +1052,7 @@
 PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names)
 {
     int code = 0;
-    if (names) {
+    if (f && names) {
        PerlIO_list_t *layers = PerlIO_list_alloc(aTHX);
        code = PerlIO_parse_layers(aTHX_ layers, names);
        if (code == 0) {
End of Patch.

Reply via email to