~ubuntu-branches/ubuntu/raring/nss/raring-security

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/certdb/certdb.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-03-25 13:46:06 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100325134606-bl6liuok2w9l7snv
Tags: 3.12.6-0ubuntu1
* New upstream release 3.12.6 RTM (NSS_3_12_6_RTM)
  - fixes CVE-2009-3555 aka US-CERT VU#120541
* Adjust patches to changed upstream code base
  - update debian/patches/38_kbsd.patch
  - update debian/patches/38_mips64_build.patch
  - update debian/patches/85_security_load.patch
* Remove patches that are merged upstream
  - delete debian/patches/91_nonexec_stack.patch
  - update debian/patches/series
* Bump nspr dependency to 4.8
  - update debian/control
* Add new symbols for 3.12.6
  - update debian/libnss3-1d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
/*
40
40
 * Certificate handling code
41
41
 *
42
 
 * $Id: certdb.c,v 1.100 2009/03/23 02:18:19 nelson%bolyard.com Exp $
 
42
 * $Id: certdb.c,v 1.102 2010/02/10 02:00:57 wtc%google.com Exp $
43
43
 */
44
44
 
45
45
#include "nssilock.h"
1553
1553
                */
1554
1554
                int cnLen = current->name.other.len;
1555
1555
                rv = CERT_RFC1485_EscapeAndQuote(cn, cnBufLen, 
1556
 
                                            current->name.other.data, cnLen);
 
1556
                                            (char *)current->name.other.data,
 
1557
                                            cnLen);
1557
1558
                if (rv != SECSuccess && PORT_GetError() == SEC_ERROR_OUTPUT_LEN) {
1558
1559
                    cnBufLen = cnLen * 3 + 3; /* big enough for worst case */
1559
1560
                    cn = (char *)PORT_ArenaAlloc(arena, cnBufLen);
1560
1561
                    if (!cn)
1561
1562
                        goto fail;
1562
1563
                    rv = CERT_RFC1485_EscapeAndQuote(cn, cnBufLen, 
1563
 
                                            current->name.other.data, cnLen);
 
1564
                                            (char *)current->name.other.data,
 
1565
                                            cnLen);
1564
1566
                }
1565
1567
                if (rv == SECSuccess)
1566
1568
                    rv = cert_TestHostName(cn ,hn);
1739
1741
              return SECFailure;
1740
1742
            PORT_Memcpy(cn, currentInput->name.other.data, 
1741
1743
                            currentInput->name.other.len);
1742
 
            cn[currentInput->name.other.len + 1] = 0;
 
1744
            cn[currentInput->name.other.len] = 0;
1743
1745
            break;
1744
1746
        case certIPAddress:
1745
1747
            if (currentInput->name.other.len == 4) {
1751
1753
              memcpy(&addr.ipv6.ip, currentInput->name.other.data, 
1752
1754
                                    currentInput->name.other.len);
1753
1755
            }
1754
 
            if (PR_NetAddrToString(&addr, ipbuf, sizeof(ipbuf) == PR_FAILURE))
 
1756
            if (PR_NetAddrToString(&addr, ipbuf, sizeof(ipbuf)) == PR_FAILURE)
1755
1757
              return SECFailure;
1756
1758
            cn = PORT_ArenaStrdup(nickNames->arena, ipbuf);
1757
1759
            if (!cn)