We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e260706 commit c4d14dbCopy full SHA for c4d14db
1 file changed
paligemma/image.cc
@@ -140,11 +140,11 @@ bool Image::ReadPPM(const hwy::Span<const char>& buf) {
140
}
141
++pos;
142
if (width == 0 || height == 0) {
143
- std::cerr << "Invalid zero dimension\n";
+ HWY_ABORT("Invalid zero dimension\n");
144
return false;
145
146
if (width > SIZE_MAX / 3 || width * 3 > SIZE_MAX / height) {
147
- std::cerr << "Image dimensions overflow\n";
+ HWY_ABORT("Image dimensions overflow\n");
148
149
150
const size_t data_size = width * height * 3;
0 commit comments