Skip to content

Commit

Permalink
Bug 492464: Update NSPR to NSPR_4_8_RTM.
Browse files Browse the repository at this point in the history
Fix bug 492779 and bug 493378.
  • Loading branch information
wantehchang committed May 20, 2009
1 parent 400eb47 commit 1df3c7c
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 8 deletions.
1 change: 0 additions & 1 deletion nsprpub/config/prdepend.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@
*/

#error "Do not include this header file."

12 changes: 10 additions & 2 deletions nsprpub/lib/libc/src/base64.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ PL_Base64Encode

if( (char *)0 == dest )
{
PRUint32 destlen = ((srclen + 2)/3) * 4;
PRUint32 destlen;
/* Ensure all PRUint32 values stay within range. */
if( srclen > (PR_UINT32_MAX/4) * 3 )
{
return (char *)0;
}
destlen = ((srclen + 2)/3) * 4;
dest = (char *)PR_MALLOC(destlen + 1);
if( (char *)0 == dest )
{
Expand Down Expand Up @@ -403,7 +409,9 @@ PL_Base64Decode

if( (char *)0 == dest )
{
PRUint32 destlen = ((srclen * 3) / 4);
/* The following computes ((srclen * 3) / 4) without overflow. */
PRUint32 rem = srclen % 4;
PRUint32 destlen = (srclen / 4) * 3 + (rem * 3) / 4;
dest = (char *)PR_MALLOC(destlen + 1);
if( (char *)0 == dest )
{
Expand Down
2 changes: 1 addition & 1 deletion nsprpub/lib/libc/src/strlen.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ PL_strlen(const char *str)
* we don't have ultra long strings that overflow an int32
*/
if( sizeof(PRUint32) < sizeof(size_t) )
PR_ASSERT(l < 2147483647);
PR_ASSERT(l <= PR_INT32_MAX);

return (PRUint32)l;
}
Expand Down
Empty file modified nsprpub/pkg/solaris/SUNWprd/Makefile.in
100644 → 100755
Empty file.
Empty file modified nsprpub/pkg/solaris/SUNWprd/pkginfo.tmpl
100644 → 100755
Empty file.
6 changes: 4 additions & 2 deletions nsprpub/pr/include/obsolete/protypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ typedef PRIntn intn;
*
* On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
* defines the types int8, int16, int32, and int64.
*
* On OS/2, sys/types.h defines uint.
*/
#ifdef XP_UNIX
#if defined(XP_UNIX) || defined(XP_OS2)
#include <sys/types.h>
#endif

Expand All @@ -86,7 +88,7 @@ typedef PRIntn intn;
* uint
*/

#if !defined(XP_BEOS) && !defined(XP_UNIX) || defined(NTO)
#if !defined(XP_BEOS) && !defined(XP_OS2) && !defined(XP_UNIX) || defined(NTO)
typedef PRUintn uint;
#endif

Expand Down
4 changes: 2 additions & 2 deletions nsprpub/pr/include/prinit.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ PR_BEGIN_EXTERN_C
** The format of the version string is
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/
#define PR_VERSION "4.8 Beta 2"
#define PR_VERSION "4.8"
#define PR_VMAJOR 4
#define PR_VMINOR 8
#define PR_VPATCH 0
#define PR_BETA PR_TRUE
#define PR_BETA PR_FALSE

/*
** PRVersionCheck
Expand Down
Empty file modified nsprpub/pr/include/prvrsion.h
100644 → 100755
Empty file.
Empty file modified nsprpub/pr/src/cplus/rcthread.cpp
100644 → 100755
Empty file.
Empty file modified nsprpub/pr/tests/poll_er.c
100644 → 100755
Empty file.
Empty file modified nsprpub/pr/tests/selct_er.c
100644 → 100755
Empty file.

0 comments on commit 1df3c7c

Please sign in to comment.