Skip to content

Commit

Permalink
Add one more for JPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
vrabaud committed Jan 17, 2025
1 parent 363ca38 commit 5f49f84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-unix-static-sanitized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ jobs:
run: |
sed -i -e 's/cmake -S \(.*\)/cmake -S \1 -DWITH_SIMD=OFF/g' libjpeg.cmd
./libjpeg.cmd
env:
CFLAGS: ${{ env.CI_CFLAGS }}
CXXFLAGS: ${{ env.CI_CXXFLAGS }}
LDFLAGS: ${{ env.CI_LDFLAGS }}
LD_LIBRARY_PATH: ${{ env.CI_LD_LIBRARY_PATH }}

- name: Build aom for msan
if: ${{ (steps.cache-hit.outputs.hit == 'false') && (matrix.sanitizer == 'memory')}}
Expand Down
2 changes: 2 additions & 0 deletions apps/shared/avifjpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ static avifBool avifJPEGReadInternal(FILE * f,

int row_stride = cinfo.output_width * cinfo.output_components;
JSAMPARRAY buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr)&cinfo, JPOOL_IMAGE, row_stride, 1);
AVIF_ANNOTATE_MEMORY_IS_INITIALIZED(buffer, row_stride);

avif->width = cinfo.output_width;
avif->height = cinfo.output_height;
Expand Down Expand Up @@ -994,6 +995,7 @@ static avifBool avifJPEGReadInternal(FILE * f,
goto cleanup;
}
uint8_t * pixelRow = &rgb.pixels[row * rgb.rowBytes];
AVIF_ANNOTATE_MEMORY_IS_INITIALIZED(buffer, sizeof(buffer[0]));
AVIF_ANNOTATE_MEMORY_IS_INITIALIZED(buffer[0], rgb.rowBytes);
memcpy(pixelRow, buffer[0], rgb.rowBytes);
++row;
Expand Down

0 comments on commit 5f49f84

Please sign in to comment.