diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-04-24 08:08:59 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-04-24 08:08:59 +0000 |
commit | 4305d8abee2315e02cb395dec9deede4e7f9f179 (patch) | |
tree | 589457fcbd396f8c384fbe3a221e3e0f2f3fc0f6 /universal.c | |
parent | 8bcaa1dfb69612366728f7905b96ca3f11eafd21 (diff) | |
download | perl-4305d8abee2315e02cb395dec9deede4e7f9f179.tar.gz |
avoid using uninitialized memory in require version check
p4raw-id: //depot/perl@5924
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/universal.c b/universal.c index 9adc42de84..6c555a1347 100644 --- a/universal.c +++ b/universal.c @@ -262,7 +262,7 @@ XS(XS_UNIVERSAL_VERSION) break; } if (len) { - if (SvNIOKp(req) && SvPOK(req)) { + if (SvNOK(req) && SvPOK(req)) { /* they said C<use Foo v1.2.3> and $Foo::VERSION * doesn't look like a float: do string compare */ if (sv_cmp(req,sv) == 1) { @@ -283,7 +283,7 @@ XS(XS_UNIVERSAL_VERSION) /* if we get here, we're looking for a numeric comparison, * so force the required version into a float, even if they * said C<use Foo v1.2.3> */ - if (SvNIOKp(req) && SvPOK(req)) { + if (SvNOK(req) && SvPOK(req)) { NV n = SvNV(req); req = sv_newmortal(); sv_setnv(req, n); |