message: Check for too large jpeg images before decompressing.
diff: @@ -152,7 +152,9 @@ uint8* UncompressLow(const void* srcdata, FewerArgsForCompiler* argball) {
  cinfo.scale_denom = ratio;
  cinfo.dct_method = flags.dct_method;
  - jpeg_start_decompress(&cinfo);
  + // Determine the output image size before attempting decompress to prevent
  + // OOM'ing doing the decompress
  + jpeg_calc_output_dimensions(&cinfo);
  int64 total_size = static_cast<int64>(cinfo.output_height) *
  static_cast<int64>(cinfo.output_width);
  @@ -170,6 +172,8 @@ uint8* UncompressLow(const void* srcdata, FewerArgsForCompiler* argball) {
  return nullptr;
  }
  + jpeg_start_decompress(&cinfo);
  +
  JDIMENSION target_output_width = cinfo.output_width;
  JDIMENSION target_output_height = cinfo.output_height;
  JDIMENSION skipped_scanlines = 0;
  