From: Devin Heitmueller Date: Fri, 20 Apr 2007 18:20:21 +0000 (-0400) Subject: strxfrm() returns a size_t, not a ssize_t. See: X-Git-Tag: accepted/trunk/20130322.191538~15356 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=224e8ef5af1c2136286a2281940d1d58698affca;p=platform%2Fupstream%2Fperl.git strxfrm() returns a size_t, not a ssize_t. See: Subject: locale.c usage of strxfrm From: "Devin Heitmueller" Message-ID: <412bdbff0704201520i7aac0189n74f0cef5c5213f41@mail.gmail.com> p4raw-id: //depot/perl@31092 --- diff --git a/locale.c b/locale.c index d90b557..c9d0628 100644 --- a/locale.c +++ b/locale.c @@ -588,11 +588,11 @@ Perl_mem_collxfrm(pTHX_ const char *s, STRLEN len, STRLEN *xlen) *(U32*)xbuf = PL_collation_ix; xout = sizeof(PL_collation_ix); for (xin = 0; xin < len; ) { - SSize_t xused; + Size_t xused; for (;;) { xused = strxfrm(xbuf + xout, s + xin, xAlloc - xout); - if (xused == -1) + if (xused >= PERL_INT_MAX) goto bad; if ((STRLEN)xused < xAlloc - xout) break;