pdf-js: initial integration (#11270)

[PDF.js](https://mozilla.github.io/pdf.js/) is a Portable Document
Format (PDF) viewer that is built with HTML5.
 - It has `44.6k` stars on github.
 - PDF.js is built into version 19+ of Firefox.
- Available as extension for Chrome at [Chrome Web
Store](https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm)
This commit is contained in:
manunio 2023-12-07 04:31:40 +05:30 committed by GitHub
parent d33edba36c
commit 4116e9b5ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,21 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder-javascript
RUN apt-get update && apt-get install -y make autoconf automake libtool
RUN git clone --depth 1 https://github.com/mozilla/pdf.js pdf-js
WORKDIR pdf-js
COPY build.sh $SRC/

25
projects/pdf-js/build.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash -eu
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
npm install --save-dev @jazzer.js/core
npm install -g gulp-cli
gulp image_decoders
compile_javascript_fuzzer pdf-js test/fuzz/jpeg_image.fuzz --sync
compile_javascript_fuzzer pdf-js test/fuzz/jbig2_image.fuzz --sync
compile_javascript_fuzzer pdf-js test/fuzz/jpx_image.fuzz --sync

View File

@ -0,0 +1,10 @@
homepage: "https://github.com/mozilla/pdf.js"
language: javascript
primary_contact: "mcastelluccio@mozilla.com"
main_repo: "https://github.com/mozilla/pdf.js"
vendor_ccs:
- maxnair.dev@gmail.com
fuzzing_engines:
- libfuzzer
sanitizers:
- none