diff options
author | Slaven Rezic <slaven@rezic.de> | 2003-10-19 19:54:59 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-10-20 19:22:38 +0000 |
commit | a0625d383a69c2c6fd20da94ef6df644cb75b45b (patch) | |
tree | d334b43d0b0c72e5dc106c1ca169f5268111cb26 /perlio.c | |
parent | 4a30c06bd54cc1d9f8821019596ec5449d182a2e (diff) | |
download | perl-a0625d383a69c2c6fd20da94ef6df644cb75b45b.tar.gz |
Re: [perl #24225] [5.8.1] segfault in binmode STDOUT, ':stdio'; print 1
Message-ID: <871xt9te7g.fsf@vran.herceg.de>
p4raw-id: //depot/perl@21505
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2613,8 +2613,10 @@ char * PerlIOStdio_mode(const char *mode, char *tmode) { char *ret = tmode; - while (*mode) { - *tmode++ = *mode++; + if (mode) { + while (*mode) { + *tmode++ = *mode++; + } } #if defined(PERLIO_USING_CRLF) || defined(__CYGWIN__) *tmode++ = 'b'; |