diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-09-17 19:26:01 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-09-17 19:26:01 +0000 |
commit | 7f39519f31fe8f3aa4f113c542472c46ec6c535a (patch) | |
tree | b0b413cca524a2399654fac621d7a5e32f7ab699 /doio.c | |
parent | be981c670f6cd575d33c165ebfacc6c0c96c358b (diff) | |
download | perl-7f39519f31fe8f3aa4f113c542472c46ec6c535a.tar.gz |
Fix one genuine unitialised code path spotted by gcc, and a signed/
unsigned warning.
p4raw-id: //depot/perl@28863
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1319,6 +1319,7 @@ Perl_my_stat(pTHX) } else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { io = (IO*)SvRV(sv); + gv = NULL; goto do_fstat_have_io; } @@ -2251,7 +2252,8 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp) SETERRNO(0,0); if (shmctl(id, IPC_STAT, &shmds) == -1) return -1; - if (mpos < 0 || msize < 0 || (size_t)mpos + msize > shmds.shm_segsz) { + if (mpos < 0 || msize < 0 + || (size_t)mpos + msize > (size_t)shmds.shm_segsz) { SETERRNO(EFAULT,SS_ACCVIO); /* can't do as caller requested */ return -1; } |