diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-27 00:35:47 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-27 00:35:47 +0000 |
commit | 22c522dff2af214d7ac14a8885bb5f213c997ba5 (patch) | |
tree | 2d2ed7888c1ce7d1ed50c1a089486bcc63e6e1a1 | |
parent | 0110aa014f97741d8a9f48382bd97bfc15d8cd60 (diff) | |
download | perl-22c522dff2af214d7ac14a8885bb5f213c997ba5.tar.gz |
No point in checking the length before we know whether the pointer
is bogus or not, fixes Abigail's odbm failures in Linux.
p4raw-id: //depot/perl@8555
-rw-r--r-- | sv.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -3530,16 +3530,17 @@ void Perl_sv_setpvn(pTHX_ register SV *sv, register const char *ptr, register STRLEN len) { register char *dptr; - { - /* len is STRLEN which is unsigned, need to copy to signed */ - IV iv = len; - assert(iv >= 0); - } + SV_CHECK_THINKFIRST(sv); if (!ptr) { (void)SvOK_off(sv); return; } + else { + /* len is STRLEN which is unsigned, need to copy to signed */ + IV iv = len; + assert(iv >= 0); + } (void)SvUPGRADE(sv, SVt_PV); SvGROW(sv, len + 1); |