Skip to content

Commit

Permalink
Fix uninitialized value use
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 701877096
Change-Id: I5dcae70aa7e1bf0da67a85b87d6fca36b9ed172d
  • Loading branch information
happyCoder92 authored and copybara-github committed Dec 2, 2024
1 parent 5e240ca commit 2d85dbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sandboxed_api/var_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ class Array : public Var {
}

// Pointer to the data, owned by the object if buffer_owned_ is 'true'.
T* arr_;
size_t nelem_; // Number of elements
size_t total_size_; // Total size in bytes
bool buffer_owned_; // Whether we own the buffer
T* arr_ = nullptr;
size_t nelem_ = 0; // Number of elements
size_t total_size_ = 0; // Total size in bytes
bool buffer_owned_ = false; // Whether we own the buffer
};

// Specialized Array class for representing NUL-terminated C-style strings. The
Expand Down

0 comments on commit 2d85dbf

Please sign in to comment.