~ubuntu-branches/ubuntu/lucid/seamonkey/lucid-security

« back to all changes in this revision

Viewing changes to security/nss/lib/ckfw/nsprstub.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin
  • Date: 2008-07-29 21:29:02 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080729212902-spm9kpvchp9udwbw
Tags: 1.1.11+nobinonly-0ubuntu1
* New security upstream release: 1.1.11 (LP: #218534)
  Fixes USN-602-1, USN-619-1, USN-623-1 and USN-629-1
* Refresh diverged patch:
  - update debian/patches/80_security_build.patch
* Fix FTBFS with missing -lfontconfig
  - add debian/patches/11_fix_ftbfs_with_fontconfig.patch
  - update debian/patches/series
* Build with default gcc (hardy: 4.2, intrepid: 4.3)
  - update debian/rules
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 * SW FORTEZZA to link with some low level security functions without dragging
43
43
 * in NSPR.
44
44
 *
45
 
 * $Id: nsprstub.c,v 1.6 2004/07/29 22:51:00 jpierre%netscape.com Exp $
 
45
 * $Id: nsprstub.c,v 1.6.28.1 2007/07/26 06:47:36 biswatosh.chakraborty%sun.com Exp $
46
46
 */
47
47
 
48
48
#include "seccomon.h"
74
74
    rv = (void *)malloc(bytes ? bytes : 1);
75
75
    if (!rv) {
76
76
        ++port_allocFailures;
 
77
        PORT_SetError(SEC_ERROR_NO_MEMORY);
77
78
    }
78
79
    return rv;
79
80
}
86
87
    rv = (void *)realloc(oldptr, bytes);
87
88
    if (!rv) {
88
89
        ++port_allocFailures;
 
90
        PORT_SetError(SEC_ERROR_NO_MEMORY);
89
91
    }
90
92
    return rv;
91
93
}
99
101
    rv = (void *)calloc(1, bytes ? bytes : 1);
100
102
    if (!rv) {
101
103
        ++port_allocFailures;
 
104
        PORT_SetError(SEC_ERROR_NO_MEMORY);
102
105
    }
103
106
    return rv;
104
107
}
143
146
    PL_ARENA_ALLOCATE(p, arena, size);
144
147
    if (p == NULL) {
145
148
        ++port_allocFailures;
 
149
        PORT_SetError(SEC_ERROR_NO_MEMORY);
146
150
    }
147
151
 
148
152
    return(p);
156
160
    PL_ARENA_ALLOCATE(p, arena, size);
157
161
    if (p == NULL) {
158
162
        ++port_allocFailures;
 
163
        PORT_SetError(SEC_ERROR_NO_MEMORY);
159
164
    } else {
160
165
        PORT_Memset(p, 0, size);
161
166
    }
177
182
    PORT_Assert(newsize >= oldsize);
178
183
    
179
184
    PL_ARENA_GROW(ptr, arena, oldsize, ( newsize - oldsize ) );
180
 
    
 
185
    if (ptr == NULL) { 
 
186
        ++port_allocFailures;
 
187
        PORT_SetError(SEC_ERROR_NO_MEMORY);
 
188
    }    
 
189
 
181
190
    return(ptr);
182
191
}
183
192