Index: ossp-pkg/pth/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/pth/ChangeLog,v rcsdiff -q -kk '-r1.636' '-r1.637' -u '/v/ossp/cvs/ossp-pkg/pth/ChangeLog,v' 2>/dev/null --- ChangeLog 2005/02/18 20:40:21 1.636 +++ ChangeLog 2005/02/18 21:45:36 1.637 @@ -21,6 +21,10 @@ Changes between 2.0.3 and 2.0.4 (03-Dec-2004 to 18-Feb-2005) + *) Fix internal determination of maximum number in a size_t in + the string formatter engine. + [Ralf S. Engelschall] + *) Upgraded build environment to GNU libtool 1.5.14 [Ralf S. Engelschall] Index: ossp-pkg/pth/pth_string.c RCS File: /v/ossp/cvs/ossp-pkg/pth/pth_string.c,v rcsdiff -q -kk '-r1.13' '-r1.14' -u '/v/ossp/cvs/ossp-pkg/pth/pth_string.c,v' 2>/dev/null --- pth_string.c 2004/12/31 19:34:45 1.13 +++ pth_string.c 2005/02/18 21:45:36 1.14 @@ -121,8 +121,8 @@ ch = *format++; if (maxlen == -1) - /* possible maximum size in a size_t */ - maxlen = (~(1<<((sizeof(size_t)*8)-2))); + /* possible maximum size in a size_t (size_t unfortunately could be signed) */ + maxlen = (~(((size_t)1)<<((sizeof(size_t)*8)-1))); while (state != DP_S_DONE) { if ((ch == NUL) || (currlen >= maxlen))