Missing check for out-of-memory situation

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
13 years ago
11 years ago

People

(Reporter: vda, Unassigned)

Tracking

1.8 Branch

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060320 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060320 Firefox/1.5

JSConsole:858

    newBuffer = new CHAR[aSize + count + 1];
    LPSTR writePointer = newBuffer;
    while (*readPointer != '\0') {
      if (*readPointer == '\n') {
        *writePointer++ = 0x0D;
      }
      *writePointer++ = *readPointer++;
    }
    *writePointer = '\0';
  }

  return newBuffer;
}

newBuffer is not checked for NULL after new

Reproducible: Always
Assignee: nobody → viewer-app
Component: General → Viewer App
Product: Firefox → Core
QA Contact: general
Version: unspecified → 1.8 Branch

Comment 1

13 years ago
wontfix see bug 335930
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.