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

« back to all changes in this revision

Viewing changes to xpcom/obsolete/nsFileSpecWin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2008-11-26 14:54:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081126145421-qpjfr14j0sulg9le
Tags: 1.1.13+nobinonly-0ubuntu1
* New security upstream release: 1.1.13 (LP: #297789)
  - CVE-2008-4582: Information stealing via local shortcut files
  - CVE-2008-5012: Image stealing via canvas and HTTP redirect
  - CVE-2008-5013: Arbitrary code execution via Flash Player dynamic module unloading
  - CVE-2008-5014: Crash and remote code execution via __proto__ tampering
  - CVE-2008-5017: Browser engine crash - Firefox 2 and 3
  - CVE-2008-5018: JavaScript engine crashes - Firefox 2 and 3
  - CVE-2008-5019: XSS and JavaScript privilege escalation via session restore
  - CVE-2008-0017: Buffer overflow in http-index-format parser
  - CVE-2008-5021: Crash and remote code execution in nsFrameManager
  - CVE-2008-5022: nsXMLHttpRequest::NotifyEventListeners() same-origin violation
  - CVE-2008-5023: -moz-binding property bypasses security checks on codebase principals
  - CVE-2008-5024: Parsing error in E4X default namespace
  - CVE-NOTASSIGN (MFSA2008-59): Script access to .documentURI and .textContent in mail

* re-run autoconf2.13 to update configure patch to changed upstream codebase
  - update debian/patches/99_configure.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
520
520
 
521
521
//----------------------------------------------------------------------------------------
522
522
nsresult
523
 
nsFileSpec::Truncate(PRInt32 aNewFileLength) const
 
523
nsFileSpec::Truncate(PRUint32 aNewFileLength) const
524
524
//----------------------------------------------------------------------------------------
525
525
{
526
 
    DWORD status;
527
526
    HANDLE hFile;
 
527
    LARGE_INTEGER li;
528
528
 
529
529
    // Leave it to Microsoft to open an existing file with a function
530
530
    // named "CreateFile".
539
539
        return NS_FILE_FAILURE;
540
540
 
541
541
    // Seek to new, desired end of file
542
 
    status = SetFilePointer(hFile, aNewFileLength, NULL, FILE_BEGIN);
543
 
    if (status == 0xffffffff)
 
542
    li.QuadPart = aNewFileLength;
 
543
    li.LowPart = SetFilePointer(hFile,
 
544
                                li.LowPart,
 
545
                                &li.HighPart,
 
546
                                FILE_BEGIN);
 
547
    if (0xffffffff == li.LowPart && GetLastError() != NO_ERROR)
544
548
        goto error;
545
549
 
546
550
    // Truncate file at current cursor position