Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox brotli #138

Merged
merged 1 commit into from
Apr 19, 2022
Merged

Sandbox brotli #138

merged 1 commit into from
Apr 19, 2022

Conversation

oshogbo
Copy link
Contributor

@oshogbo oshogbo commented Mar 6, 2022

This change is Reviewable

Copy link
Member

@cblichmann cblichmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 16 of 16 files at r1, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @oshogbo)


contrib/brotli/sandboxed.h, line 35 at r1 (raw file):

        .AllowSystemMalloc()
        .AllowExit()
        .AllowGetPIDs() // XXX:remove me

What does that mean? Do we need those or not? :)


contrib/brotli/utils/utils_brotli_dec.h, line 25 at r1 (raw file):

class BrotliDecoder {
 public:
  BrotliDecoder(BrotliSandbox* sandbox)

Add explicit to constructor


contrib/brotli/utils/utils_brotli_dec.h, line 33 at r1 (raw file):

  bool IsInit();

  absl::Status SetParameter(enum BrotliDecoderParameter param, uint32_t value);

No need to specify this in C++, just BrotliDecoderParameter

Code quote:

enum

contrib/brotli/utils/utils_brotli_dec.cc, line 76 at r1 (raw file):

  // as function moves to pointer to indicate how much data
  // was compressed.
  // Un this case we compress whole buffer so we don't use it

In

Code quote:

Un

contrib/brotli/utils/utils_brotli_enc.h, line 25 at r1 (raw file):

class BrotliEncoder {
 public:
  BrotliEncoder(BrotliSandbox* sandbox)

This constructor also needs to be marked explicit

Code quote:

  BrotliEncoder(BrotliSandbox* sandbox)

contrib/brotli/utils/utils_brotli_enc.h, line 33 at r1 (raw file):

  bool IsInit();

  absl::Status SetParameter(enum BrotliEncoderParameter param, uint32_t value);

See above in decoder header.

Code quote:

enum BrotliEncoderParameter param

Copy link
Contributor Author

@oshogbo oshogbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @cblichmann)


contrib/brotli/sandboxed.h, line 35 at r1 (raw file):

Previously, cblichmann (Christian Blichmann) wrote…

What does that mean? Do we need those or not? :)

Yea I should remove it.


contrib/brotli/utils/utils_brotli_dec.h, line 25 at r1 (raw file):

BrotliDecoderParameter
Done.


contrib/brotli/utils/utils_brotli_dec.h, line 33 at r1 (raw file):

Previously, cblichmann (Christian Blichmann) wrote…

No need to specify this in C++, just BrotliDecoderParameter

Done.


contrib/brotli/utils/utils_brotli_dec.cc, line 76 at r1 (raw file):

Previously, cblichmann (Christian Blichmann) wrote…

In

Thanks!


contrib/brotli/utils/utils_brotli_enc.h, line 25 at r1 (raw file):

Previously, cblichmann (Christian Blichmann) wrote…

This constructor also needs to be marked explicit

Done.


contrib/brotli/utils/utils_brotli_enc.h, line 33 at r1 (raw file):

Previously, cblichmann (Christian Blichmann) wrote…

See above in decoder header.

Done.

@cblichmann
Copy link
Member

Pending internal review.

@copybara-service copybara-service bot merged commit 5125c8f into google:main Apr 19, 2022
happyCoder92 pushed a commit that referenced this pull request May 4, 2022
PiperOrigin-RevId: 442741238
Change-Id: Ic8183c0fa74db45ecab0d677d4b901a78a98df40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants