db-d2/primevul-codebert-embeddings huggingface dataset:
Commit message: None
CVE: None
Vulnerability description: None

Project: Chrome

DesktopNativeWidgetHelperAura::DesktopNativeWidgetHelperAura(
    NativeWidgetAura* widget)
    : widget_(widget),
      root_window_event_filter_(NULL),
      is_embedded_window_(false) {
}

Project: Chrome

  explicit EmbeddedWindowScreenPositionClient(NativeWidgetAura* widget)
      : widget_(widget) {}

Project: Chrome

aura::RootWindow* DesktopNativeWidgetHelperAura::GetRootWindow() {
  return root_window_.get();
}

Project: Chrome

gfx::Rect DesktopNativeWidgetHelperAura::ModifyAndSetBounds(
    const gfx::Rect& bounds) {
  gfx::Rect out_bounds = bounds;
  if (root_window_.get() && !out_bounds.IsEmpty()) {
    root_window_->SetHostBounds(out_bounds);
    out_bounds.set_x(0);
    out_bounds.set_y(0);
  } else if (is_embedded_window_) {
    aura::RootWindow* root =
        widget_->GetNativeWindow()->GetRootWindow()->GetRootWindow();
    gfx::Point point = root->GetHostOrigin();
    out_bounds.set_x(out_bounds.x() - point.x());
    out_bounds.set_y(out_bounds.y() - point.y());
  }

  return out_bounds;
}

Project: Chrome

void DesktopNativeWidgetHelperAura::OnRootWindowHostClosed(
    const aura::RootWindow* root) {
  DCHECK_EQ(root, root_window_.get());
  widget_->GetWidget()->Close();
}

Project: Chrome

void DesktopNativeWidgetHelperAura::PostInitialize() {
#if defined(OS_WIN)
  subclass_.reset(new ui::HWNDSubclass(root_window_->GetAcceleratedWidget()));
  subclass_->SetFilter(new WidgetMessageFilter(root_window_.get(),
                                               widget_->GetWidget()));
#endif
}

Project: Chrome

  explicit RootWindowScreenPositionClient(aura::RootWindow* root_window)
      : root_window_(root_window) {}

Project: Chrome

void DesktopNativeWidgetHelperAura::ShowRootWindow() {
  if (root_window_.get())
    root_window_->ShowRootWindow();
}

Project: Chrome

DesktopNativeWidgetHelperAura::~DesktopNativeWidgetHelperAura() {
  if (root_window_event_filter_) {
#if defined(USE_X11)
    root_window_event_filter_->RemoveFilter(x11_window_event_filter_.get());
#endif

    root_window_event_filter_->RemoveFilter(input_method_filter_.get());
  }
}

Project: Chrome

  virtual ~EmbeddedWindowScreenPositionClient() {}

Project: Chrome

  virtual ~RootWindowScreenPositionClient() {}
Commit message: None
CVE: CVE-2012-2833
CWE: CWE-119
Vulnerability description: Buffer overflow in the JS API in the PDF functionality in Google Chrome before 20.0.1132.43 allows remote attackers to cause a denial of service or possibly have unspecified other impact via unknown vectors.

Project: Chrome

DOMDataStoreHandle::DOMDataStoreHandle(bool initialize)
    : m_store(adoptPtr(!initialize ? 0 : new ScopedDOMDataStore()))
{
    if (m_store)
        V8PerIsolateData::current()->registerDOMDataStore(m_store.get());
}

Project: Chrome

DOMNodeMapping& getActiveDOMNodeMap(v8::Isolate* isolate)
{
    return DOMData::getCurrentStore(isolate).activeDomNodeMap();
}

Project: Chrome

DOMWrapperMap<void>& getActiveDOMObjectMap(v8::Isolate* isolate)
{
    return DOMData::getCurrentStore(isolate).activeDomObjectMap();
}

Project: Chrome

DOMNodeMapping& getDOMNodeMap(v8::Isolate* isolate)
{
    return DOMData::getCurrentStore(isolate).domNodeMap();
}

Project: Chrome

DOMWrapperMap<void>& getDOMObjectMap(v8::Isolate* isolate)
{
    return DOMData::getCurrentStore(isolate).domObjectMap();
}

Project: Chrome

void visitActiveDOMObjects(DOMWrapperMap<void>::Visitor* visitor)
{
    v8::HandleScope scope;

    DOMDataList& list = DOMDataStore::allStores();
    for (size_t i = 0; i < list.size(); ++i) {
        DOMDataStore* store = list[i];

        store->activeDomObjectMap().visit(store, visitor);
    }
}

Project: Chrome

void visitDOMNodes(DOMWrapperMap<Node>::Visitor* visitor)
{
    v8::HandleScope scope;

    DOMDataList& list = DOMDataStore::allStores();
    for (size_t i = 0; i < list.size(); ++i) {
        DOMDataStore* store = list[i];

        store->domNodeMap().visit(store, visitor);
    }
}

Project: Chrome

DOMDataStoreHandle::~DOMDataStoreHandle()
{
    if (m_store)
        V8PerIsolateData::current()->unregisterDOMDataStore(m_store.get());
}
Commit message: None
CVE: CVE-2011-3965
CWE: CWE-20
Vulnerability description: Google Chrome before 17.0.963.46 does not properly check signatures, which allows remote attackers to cause a denial of service (application crash) via unspecified vectors.

Project: Chrome

SignatureUtil::SignatureUtil() {}

Project: Chrome

SignatureUtil::~SignatureUtil() {}
Commit message: None
CVE: CVE-2011-3967
Vulnerability description: Unspecified vulnerability in Google Chrome before 17.0.963.46 allows remote attackers to cause a denial of service (application crash) via a crafted certificate.

Project: Chrome

std::string ProcessIDN(const std::string& input) {
  string16 input16;
  input16.reserve(input.length());
  input16.insert(input16.end(), input.begin(), input.end());

  string16 output16;
  output16.resize(input.length());

  UErrorCode status = U_ZERO_ERROR;
  int output_chars = uidna_IDNToUnicode(input16.data(), input.length(),
                                        &output16[0], output16.length(),
                                        UIDNA_DEFAULT, NULL, &status);
  if (status == U_ZERO_ERROR) {
    output16.resize(output_chars);
  } else if (status != U_BUFFER_OVERFLOW_ERROR) {
    return input;
  } else {
    output16.resize(output_chars);
    output_chars = uidna_IDNToUnicode(input16.data(), input.length(),
                                      &output16[0], output16.length(),
                                      UIDNA_DEFAULT, NULL, &status);
    if (status != U_ZERO_ERROR)
      return input;
    DCHECK_EQ(static_cast<size_t>(output_chars), output16.length());
    output16.resize(output_chars);  // Just to be safe.
  }

  if (input16 == output16)
    return input;  // Input did not contain any encoded data.

  return l10n_util::GetStringFUTF8(IDS_CERT_INFO_IDN_VALUE_FORMAT,
                                   input16, output16);
}

Project: Chrome

std::string ProcessRawBits(const unsigned char* data, size_t data_length) {
  return ProcessRawBytes(data, (data_length + 7) / 8);
}

Project: Chrome

std::string ProcessRawBytes(const unsigned char* data, size_t data_length) {
  return ProcessRawBytesWithSeparators(data, data_length, ' ', '\n');
}
Commit message: None
CVE: CVE-2011-3051
CWE: CWE-399
Vulnerability description: Use-after-free vulnerability in the Cascading Style Sheets (CSS) implementation in Google Chrome before 17.0.963.83 allows remote attackers to cause a denial of service or possibly have unspecified other impact via vectors related to the cross-fade function.

Project: Chrome

void InputMethodBase::DispatchFabricatedKeyEventPostIME(EventType type,
                                                        KeyboardCode key_code,
                                                        int flags) const {
  if (delegate_)
    delegate_->DispatchFabricatedKeyEventPostIME(type, key_code, flags);
}

Project: Chrome

void InputMethodBase::DispatchKeyEventPostIME(
    const base::NativeEvent& native_event) const {
  if (delegate_)
    delegate_->DispatchKeyEventPostIME(native_event);
}

Project: Chrome

TextInputClient* InputMethodBase::GetTextInputClient() const {
  return system_toplevel_window_focused_ ? text_input_client_ : NULL;
}

Project: Chrome

void InputMethodBase::Init(bool focused) {
  if (focused)
    OnFocus();
}

Project: Chrome

InputMethodBase::InputMethodBase()
  : delegate_(NULL),
    text_input_client_(NULL),
    system_toplevel_window_focused_(false) {
}

Project: Chrome

bool InputMethodBase::IsTextInputClientFocused(const TextInputClient* client) {
  return client && (client == GetTextInputClient());
}

Project: Chrome

bool InputMethodBase::IsTextInputTypeNone() const {
  return GetTextInputType() == TEXT_INPUT_TYPE_NONE;
}

Project: Chrome

void InputMethodBase::OnBlur() {
  DCHECK(system_toplevel_window_focused_);
  system_toplevel_window_focused_ = false;
}

Project: Chrome

void InputMethodBase::OnFocus() {
  DCHECK(!system_toplevel_window_focused_);
  system_toplevel_window_focused_ = true;
}

Project: Chrome

void InputMethodBase::SetDelegate(
    internal::InputMethodDelegate* delegate) {
  delegate_ = delegate;
}

Project: Chrome

void InputMethodBase::SetFocusedTextInputClient(TextInputClient* client) {
  TextInputClient* old = text_input_client_;
  OnWillChangeFocusedClient(old, client);
  text_input_client_ = client;  // NULL allowed.
  OnDidChangeFocusedClient(old, client);
}
Commit message: None
CVE: CVE-2013-2906
CWE: CWE-362
Vulnerability description: Multiple race conditions in the Web Audio implementation in Blink, as used in Google Chrome before 30.0.1599.66, allow remote attackers to cause a denial of service or possibly have unspecified other impact via vectors related to threading in core/html/HTMLMediaElement.cpp, core/platform/audio/AudioDSPKernelProcessor.cpp, core/platform/audio/HRTFElevation.cpp, and modules/webaudio/ConvolverNode.cpp.

Project: Chrome

ConvolverNode::ConvolverNode(AudioContext* context, float sampleRate)
    : AudioNode(context, sampleRate)
    , m_normalize(true)
{
    ScriptWrappable::init(this);
    addInput(adoptPtr(new AudioNodeInput(this)));
    addOutput(adoptPtr(new AudioNodeOutput(this, 2)));

    m_channelCount = 2;
    m_channelCountMode = ClampedMax;
    m_channelInterpretation = AudioBus::Speakers;

    setNodeType(NodeTypeConvolver);
    initialize();
}

Project: Chrome

AudioBuffer* ConvolverNode::buffer()
{
    ASSERT(isMainThread());
    return m_buffer.get();
}

Project: Chrome

void ConvolverNode::initialize()
{
    if (isInitialized())
        return;

    AudioNode::initialize();
}

Project: Chrome

void ConvolverNode::reset()
{
    MutexLocker locker(m_processLock);
    if (m_reverb.get())
        m_reverb->reset();
}

Project: Chrome

double ConvolverNode::tailTime() const
{
    MutexTryLocker tryLocker(m_processLock);
    if (tryLocker.locked())
        return m_reverb ? m_reverb->impulseResponseLength() / static_cast<double>(sampleRate()) : 0;
    return std::numeric_limits<double>::infinity();
}

Project: Chrome

ConvolverNode::~ConvolverNode()
{
    uninitialize();
}
Commit message: None
CVE: CVE-2013-2914
CWE: CWE-399
Vulnerability description: Use-after-free vulnerability in the color-chooser dialog in Google Chrome before 30.0.1599.66 on Windows allows remote attackers to cause a denial of service or possibly have unspecified other impact via vectors related to color_chooser_dialog.cc and color_chooser_win.cc in browser/ui/views/.

Project: Chrome

ColorChooserDialog::ColorChooserDialog(views::ColorChooserListener* listener,
                                       SkColor initial_color,
                                       gfx::NativeWindow owning_window)
    : listener_(listener) {
  DCHECK(listener_);
  CopyCustomColors(g_custom_colors, custom_colors_);
  ExecuteOpenParams execute_params(initial_color, BeginRun(owning_window),
                                   owning_window);
  execute_params.run_state.dialog_thread->message_loop()->PostTask(FROM_HERE,
      base::Bind(&ColorChooserDialog::ExecuteOpen, this, execute_params));
}

Project: Chrome

 void ColorChooserDialog::CopyCustomColors(COLORREF* src, COLORREF* dst) {
  memcpy(dst, src, sizeof(COLORREF) * arraysize(g_custom_colors));
}

Project: Chrome

ColorChooserDialog::ExecuteOpenParams::ExecuteOpenParams(SkColor color,
                                                         RunState run_state,
                                                         HWND owner)
    : color(color),
      run_state(run_state),
      owner(owner) {
}

Project: Chrome

bool ColorChooserDialog::IsRunning(HWND owning_hwnd) const {
  return listener_ && IsRunningDialogForOwner(owning_hwnd);
}

Project: Chrome

ColorChooserDialog::~ColorChooserDialog() {
}

Project: Chrome

void ColorChooserWin::OnColorChooserDialogClosed() {
  if (color_chooser_dialog_.get()) {
    color_chooser_dialog_->ListenerDestroyed();
    color_chooser_dialog_ = NULL;
  }
  DCHECK(current_color_chooser_ == this);
  current_color_chooser_ = NULL;
  if (web_contents_)
    web_contents_->DidEndColorChooser();
}

Project: Chrome

 void ColorChooserWin::OnColorChosen(SkColor color) {
   if (web_contents_)
     web_contents_->DidChooseColorInColorChooser(color);
}

Project: Chrome

content::ColorChooser* ShowColorChooser(content::WebContents* web_contents,
                                        SkColor initial_color) {
  return ColorChooserWin::Open(web_contents, initial_color);
}

Project: Chrome

ColorChooserWin::~ColorChooserWin() {
   DCHECK(!color_chooser_dialog_);
 }
Commit message: None
CVE: CVE-2013-2917
CWE: CWE-119
Vulnerability description: The ReverbConvolverStage::ReverbConvolverStage function in core/platform/audio/ReverbConvolverStage.cpp in the Web Audio implementation in Blink, as used in Google Chrome before 30.0.1599.66, allows remote attackers to cause a denial of service (out-of-bounds read) via vectors related to the impulseResponse array.

Project: Chrome

void ReverbConvolverStage::processInBackground(ReverbConvolver* convolver, size_t framesToProcess)
{
    ReverbInputBuffer* inputBuffer = convolver->inputBuffer();
    float* source = inputBuffer->directReadFrom(&m_inputReadIndex, framesToProcess);
    process(source, framesToProcess);
}

Project: Chrome

void ReverbConvolverStage::reset()
{
    if (!m_directMode)
        m_fftConvolver->reset();
    else
        m_directConvolver->reset();
    m_preDelayBuffer.zero();
    m_accumulationReadIndex = 0;
    m_inputReadIndex = 0;
    m_framesProcessed = 0;
}
Commit message: None
CVE: CVE-2013-2900
CWE: CWE-22
Vulnerability description: The FilePath::ReferencesParent function in files/file_path.cc in Google Chrome before 29.0.1547.57 on Windows does not properly handle pathname components composed entirely of . (dot) and whitespace characters, which allows remote attackers to conduct directory traversal attacks via a crafted directory name.

Project: Chrome

DateTimeChooserImpl::DateTimeChooserImpl(ChromeClientImpl* chromeClient, DateTimeChooserClient* client, const DateTimeChooserParameters& parameters)
    : m_chromeClient(chromeClient)
    , m_client(client)
    , m_popup(0)
    , m_parameters(parameters)
    , m_locale(Locale::create(parameters.locale))
{
    ASSERT(m_chromeClient);
    ASSERT(m_client);
    m_popup = m_chromeClient->openPagePopup(this, m_parameters.anchorRectInRootView);
}

Project: Chrome

void DateTimeChooserImpl::closePopup()
{
    endChooser();
}

Project: Chrome

IntSize DateTimeChooserImpl::contentSize()
{
    return IntSize(0, 0);
}

Project: Chrome

PassRefPtr<DateTimeChooserImpl> DateTimeChooserImpl::create(ChromeClientImpl* chromeClient, DateTimeChooserClient* client, const DateTimeChooserParameters& parameters)
{
    return adoptRef(new DateTimeChooserImpl(chromeClient, client, parameters));
}

Project: Chrome

void DateTimeChooserImpl::didClosePopup()
{
    ASSERT(m_client);
    m_popup = 0;
    m_client->didEndChooser();
}

Project: Chrome

void DateTimeChooserImpl::endChooser()
{
    if (!m_popup)
        return;
    m_chromeClient->closePagePopup(m_popup);
}

Project: Chrome

Locale& DateTimeChooserImpl::locale()
{
    return *m_locale;
}

Project: Chrome

Element& DateTimeChooserImpl::ownerElement()
{
    return m_client->ownerElement();
}

Project: Chrome

AXObject* DateTimeChooserImpl::rootAXObject()
{
    return m_popup ? m_popup->rootAXObject() : 0;
}

Project: Chrome

void DateTimeChooserImpl::setValue(const String& value)
{
    m_client->didChooseValue(value);
}

Project: Chrome

void DateTimeChooserImpl::setValueAndClosePopup(int numValue, const String& stringValue)
{
    RefPtr<DateTimeChooserImpl> protector(this);
    if (numValue >= 0)
        setValue(stringValue);
    endChooser();
}

Project: Chrome

DateTimeChooserImpl::~DateTimeChooserImpl()
{
}
Commit message: None
CVE: CVE-2013-0880
CWE: CWE-399
Vulnerability description: Use-after-free vulnerability in Google Chrome before 25.0.1364.97 on Windows and Linux, and before 25.0.1364.99 on Mac OS X, allows remote attackers to cause a denial of service or possibly have unspecified other impact via vectors related to databases.

Project: Chrome

PP_Resource PPB_Buffer_Proxy::AddProxyResource(
    const HostResource& resource,
    base::SharedMemoryHandle shm_handle,
    uint32_t size) {
  return (new Buffer(resource, shm_handle, size))->GetReference();
}

Project: Chrome

thunk::PPB_Buffer_API* Buffer::AsPPB_Buffer_API() {
  return this;
}

Project: Chrome

Buffer::Buffer(const HostResource& resource,
               const base::SharedMemoryHandle& shm_handle,
               uint32_t size)
    : Resource(OBJECT_IS_PROXY, resource),
      shm_(shm_handle, false),
      size_(size),
      map_count_(0) {
}

Project: Chrome

PP_Resource PPB_Buffer_Proxy::CreateProxyResource(PP_Instance instance,
                                                  uint32_t size) {
  PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
  if (!dispatcher)
    return 0;

  HostResource result;
  ppapi::proxy::SerializedHandle shm_handle;
  dispatcher->Send(new PpapiHostMsg_PPBBuffer_Create(
      API_ID_PPB_BUFFER, instance, size, &result, &shm_handle));
  if (result.is_null() || !shm_handle.IsHandleValid() ||
      !shm_handle.is_shmem())
    return 0;

  return AddProxyResource(result, shm_handle.shmem(), size);
}

Project: Chrome

PP_Bool Buffer::Describe(uint32_t* size_in_bytes) {
  *size_in_bytes = size_;
  return PP_TRUE;
}

Project: Chrome

PP_Bool Buffer::IsMapped() {
  return PP_FromBool(map_count_ > 0);
}

Project: Chrome

bool PPB_Buffer_Proxy::OnMessageReceived(const IPC::Message& msg) {
  bool handled = true;
  IPC_BEGIN_MESSAGE_MAP(PPB_Buffer_Proxy, msg)
    IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBBuffer_Create, OnMsgCreate)
    IPC_MESSAGE_UNHANDLED(handled = false)
  IPC_END_MESSAGE_MAP()
  return handled;
}

Project: Chrome

void Buffer::Unmap() {
  if (--map_count_ == 0)
    shm_.Unmap();
}

Project: Chrome

Buffer::~Buffer() {
  Unmap();
}

Project: Chrome

PPB_Buffer_Proxy::~PPB_Buffer_Proxy() {
}
Commit message: None
CVE: CVE-2013-0909
CWE: CWE-200
Vulnerability description: The XSS Auditor in Google Chrome before 25.0.1364.152 allows remote attackers to obtain sensitive HTTP Referer information via unspecified vectors.

Project: Chrome

GURL GetURLForLayoutTest(const std::string& test_name,
                         FilePath* current_working_directory,
                         bool* enable_pixel_dumping,
                         std::string* expected_pixel_hash) {
  std::string path_or_url = test_name;
  std::string pixel_switch;
  std::string pixel_hash;
  std::string::size_type separator_position = path_or_url.find('\'');
  if (separator_position != std::string::npos) {
    pixel_switch = path_or_url.substr(separator_position + 1);
    path_or_url.erase(separator_position);
  }
  separator_position = pixel_switch.find('\'');
  if (separator_position != std::string::npos) {
    pixel_hash = pixel_switch.substr(separator_position + 1);
    pixel_switch.erase(separator_position);
  }
  if (enable_pixel_dumping) {
    *enable_pixel_dumping =
        (pixel_switch == "--pixel-test" || pixel_switch == "-p");
  }
  if (expected_pixel_hash)
    *expected_pixel_hash = pixel_hash;
  GURL test_url(path_or_url);
  if (!(test_url.is_valid() && test_url.has_scheme())) {
    base::ThreadRestrictions::ScopedAllowIO allow_io;
#if defined(OS_WIN)
    std::wstring wide_path_or_url =
        base::SysNativeMBToWide(path_or_url);
    FilePath local_file(wide_path_or_url);
#else
    FilePath local_file(path_or_url);
#endif
    file_util::AbsolutePath(&local_file);
    test_url = net::FilePathToFileURL(local_file);
  }
  FilePath local_path;
  {
    base::ThreadRestrictions::ScopedAllowIO allow_io;
    if (net::FileURLToFilePath(test_url, &local_path)) {
      file_util::SetCurrentDirectory(local_path.DirName());
    }
    if (current_working_directory)
      file_util::GetCurrentDirectory(current_working_directory);
  }
  return test_url;
}
Commit message: None
CVE: CVE-2013-0843
CWE: CWE-119
Vulnerability description: content/renderer/media/webrtc_audio_renderer.cc in Google Chrome before 24.0.1312.56 on Mac OS X does not use an appropriate buffer size for the 96 kHz sampling rate, which allows remote attackers to cause a denial of service (memory corruption and application crash) or possibly have unspecified other impact via a web site that provides WebRTC audio.

Project: Chrome

void AddHistogramFramesPerBuffer(int param) {
  AudioFramesPerBuffer afpb = AsAudioFramesPerBuffer(param);
  if (afpb != kUnexpectedAudioBufferSize) {
    UMA_HISTOGRAM_ENUMERATION("WebRTC.AudioOutputFramesPerBuffer",
                              afpb, kUnexpectedAudioBufferSize);
  } else {
    UMA_HISTOGRAM_COUNTS("WebRTC.AudioOutputFramesPerBufferUnexpected", param);
  }
}

Project: Chrome

bool WebRtcAudioRenderer::IsLocalRenderer() const {
  return false;
}

Project: Chrome

void WebRtcAudioRenderer::OnRenderError() {
  NOTIMPLEMENTED();
  LOG(ERROR) << "OnRenderError()";
}

Project: Chrome

void WebRtcAudioRenderer::Pause() {
  base::AutoLock auto_lock(lock_);
  if (state_ == UNINITIALIZED)
    return;

  state_ = PAUSED;
}

Project: Chrome

void WebRtcAudioRenderer::Play() {
  base::AutoLock auto_lock(lock_);
  if (state_ == UNINITIALIZED)
    return;

  state_ = PLAYING;
}

Project: Chrome

int WebRtcAudioRenderer::Render(media::AudioBus* audio_bus,
                                int audio_delay_milliseconds) {
  {
    base::AutoLock auto_lock(lock_);
    if (!source_)
      return 0;
    source_->RenderData(reinterpret_cast<uint8*>(buffer_.get()),
                        audio_bus->channels(), audio_bus->frames(),
                        audio_delay_milliseconds);

    if (state_ != PLAYING)
      return 0;
  }

  audio_bus->FromInterleaved(buffer_.get(), audio_bus->frames(),
                             params_.bits_per_sample() / 8);
  return audio_bus->frames();
}

Project: Chrome

void WebRtcAudioRenderer::SetVolume(float volume) {
  base::AutoLock auto_lock(lock_);
  if (state_ == UNINITIALIZED)
    return;

  sink_->SetVolume(volume);
}

Project: Chrome

void WebRtcAudioRenderer::Start() {
  NOTIMPLEMENTED();
}

Project: Chrome

void WebRtcAudioRenderer::Stop() {
  base::AutoLock auto_lock(lock_);
  if (state_ == UNINITIALIZED)
    return;

  source_->RemoveRenderer(this);
  source_ = NULL;
  sink_->Stop();
  state_ = UNINITIALIZED;
}

Project: Chrome

WebRtcAudioRenderer::WebRtcAudioRenderer(int source_render_view_id)
    : state_(UNINITIALIZED),
      source_render_view_id_(source_render_view_id),
      source_(NULL) {
}

Project: Chrome

WebRtcAudioRenderer::~WebRtcAudioRenderer() {
  DCHECK_EQ(state_, UNINITIALIZED);
  buffer_.reset();
}
Commit message: None
CVE: CVE-2013-0830
CWE: CWE-20
Vulnerability description: The IPC layer in Google Chrome before 24.0.1312.52 on Windows omits a NUL character required for termination of an unspecified data structure, which has unknown impact and attack vectors.

Project: Chrome

MessageIterator::MessageIterator(const Message& m) : iter_(m) {
}

Project: Chrome

int MessageIterator::NextInt() const {
  int val = -1;
  if (!iter_.ReadInt(&val))
    NOTREACHED();
  return val;
}

Project: Chrome

const std::string MessageIterator::NextString() const {
  std::string val;
  if (!iter_.ReadString(&val))
    NOTREACHED();
  return val;
}