mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
libraw: Fix left-over from cleanup
Our internal builds do not build the `contrib/` sandboxes, so I didn't notice the failing libraw build :-/ PiperOrigin-RevId: 453868469 Change-Id: Ic084b066197ace6f52c3e7ed541a811c501d20b1
This commit is contained in:
parent
95afede8a0
commit
4872ba6569
|
@ -28,7 +28,7 @@ if (NOT TARGET sapi::sapi)
|
|||
EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
FetchContent_Declare( libraw
|
||||
FetchContent_Declare(libraw
|
||||
GIT_REPOSITORY https://github.com/LibRaw/LibRaw.git
|
||||
GIT_TAG a077aac05190530f22af4254a1e31745876d007f # 2022-06-03
|
||||
)
|
||||
|
|
|
@ -17,7 +17,8 @@ add_executable(sapi_minilibraw
|
|||
../utils/utils_libraw.cc
|
||||
)
|
||||
target_link_libraries(sapi_minilibraw
|
||||
PRIVATE sapi_libraw
|
||||
PRIVATE absl::strings
|
||||
sapi_contrib::libraw
|
||||
sapi::logging
|
||||
sapi::sapi
|
||||
)
|
||||
|
|
|
@ -17,7 +17,8 @@ add_executable(sapi_libraw_test
|
|||
../utils/utils_libraw.cc
|
||||
)
|
||||
target_link_libraries(sapi_libraw_test PRIVATE
|
||||
sapi_libraw
|
||||
absl::strings
|
||||
sapi_contrib::libraw
|
||||
sapi::test_main
|
||||
sapi::temp_file
|
||||
)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "contrib/libraw/utils/utils_libraw.h"
|
||||
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "contrib/libraw/sandboxed.h"
|
||||
|
||||
absl::Status LibRaw::InitLibRaw() {
|
||||
|
@ -124,10 +125,9 @@ absl::StatusOr<int> LibRaw::GetRawWidth() {
|
|||
absl::StatusOr<unsigned int> LibRaw::GetCBlack(int channel) {
|
||||
SAPI_RETURN_IF_ERROR(CheckIsInit());
|
||||
|
||||
if (channel < 0 || >= LIBRAW_CBLACK_SIZE) {
|
||||
return absl::OutOfRangeError(absl::string_view(
|
||||
std::to_string(channel) + " is out of range for array with size " +
|
||||
std::to_string(LIBRAW_CBLACK_SIZE)));
|
||||
if (channel < 0 || channel >= LIBRAW_CBLACK_SIZE) {
|
||||
return absl::OutOfRangeError(absl::StrCat(
|
||||
channel, " is out of range for array with size ", LIBRAW_CBLACK_SIZE));
|
||||
}
|
||||
|
||||
return GetImgData().color.cblack[channel];
|
||||
|
|
Loading…
Reference in New Issue
Block a user