From: Nicholas Clark Date: Sun, 17 Sep 2006 19:26:01 +0000 (+0000) Subject: Fix one genuine unitialised code path spotted by gcc, and a signed/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f39519f31fe8f3aa4f113c542472c46ec6c535a;p=p5sagit%2Fp5-mst-13.2.git Fix one genuine unitialised code path spotted by gcc, and a signed/ unsigned warning. p4raw-id: //depot/perl@28863 --- diff --git a/doio.c b/doio.c index bc30130..e6909cb 100644 --- a/doio.c +++ b/doio.c @@ -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; }