Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:armijnhemel/binaryanalysis
Browse files Browse the repository at this point in the history
  • Loading branch information
armijnhemel committed Nov 1, 2016
2 parents 2d139a9 + e0beb03 commit 416103b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/bat-scan.config
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ priority = 0
magic = jpeg:jpegtrailer:jfif
noscan = text:xml:pdf:compressed:resource:audio:mp4:java:elf:graphics
description = Carve JPEG/JFIF files from a file
envvars = JPEG_MAXIMUM=104857600
enabled = yes

[lrzip]
Expand Down
7 changes: 6 additions & 1 deletion src/bat/fwunpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -6727,8 +6727,13 @@ def searchUnpackJPEG(filename, tempdir=None, blacklist=[], offsets={}, scanenv={
## with NUL bytes have been removed. The alternative would be to do
## a full decoding of the JPEG data in the SOS section which is not
## trivial to implement.
## TODO: make configurable. For now set to 100 MiB.
## By default set this to 100 MiB.
jpegmaxsize = 104857600
if 'JPEG_MAXIMUM' in scanenv:
try:
jpegmaxsize = int(scanenv['JPEG_MAXIMUM'])
except:
pass

datafile = open(filename, 'rb')
## Start verifying the JFIF image.
Expand Down

0 comments on commit 416103b

Please sign in to comment.