Don't rely on SvCUR to be sane unless SvPOK.
p4raw-id: //depot/perl@26953
}
#define SvRTRIM(sv) STMT_START { \
- STRLEN len = SvCUR(sv); \
- char * const p = SvPVX(sv); \
- if (p) { \
+ if (SvPOK(sv)) { \
+ STRLEN len = SvCUR(sv); \
+ char * const p = SvPVX(sv); \
while (len > 0 && isSPACE(p[len-1])) \
--len; \
SvCUR_set(sv, len); \