OSSP CVS Repository

ossp - Difference in ossp-pkg/pth/pth_string.c versions 1.13 and 1.14
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/pth/pth_string.c 1.13 -> 1.14

--- 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))

CVSTrac 2.0.1