google / sandboxed-api

Generate sandboxes for C/C++ libraries automatically
https://developers.google.com/sandboxed-api/
Apache License 2.0
1.65k stars 189 forks source link

Sandbox LibRaw #161

Closed piotrbartman closed 2 years ago

piotrbartman commented 2 years ago

This change is Reviewable

google-cla[bot] commented 2 years ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

piotrbartman commented 2 years ago

_contrib/libraw/example/main.cc, line 144 at r3 (raw file):_

      if (rcolors[col % 48] == channel) {
        absl::StatusOr<unsigned int> cblack = lr.GetCBlack(channel);

Please use uint16_t (that's what GetCBlack() basically returns, right?)

Code quote:

unsigned int

GetCBlack() returns a single value from unsigned array generated in the structure in sapi_libraw.sapi.h, so it returns unsigned. For this reason, I used unsigned int here.

cblichmann commented 2 years ago

LGTM pending internal review.