-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
BugAny unexpected behavior, until confirmed feature.Any unexpected behavior, until confirmed feature.
Milestone
Description
I get the following test_shell_injection.TestShellInjection errors on Windows using djpeg and cjpeg executables from jpeg-9a:
test_load_djpeg_filename (test_shell_injection.TestShellInjection) ... djpeg: must name one input and one output file
usage: djpeg [switches] inputfile outputfile
Switches (names may be abbreviated):
-colors N Reduce image to no more than N colors
-fast Fast, low-quality processing
-grayscale Force grayscale output
-scale M/N Scale output image by fraction M/N, eg, 1/8
-bmp Select BMP output format (Windows style)
-gif Select GIF output format
-os2 Select BMP output format (OS/2 style)
-pnm Select PBMPLUS (PPM/PGM) output format (default)
-targa Select Targa output format
Switches for advanced users:
-dct int Use integer DCT method (default)
-dct fast Use fast integer DCT (less accurate)
-dct float Use floating-point DCT method
-dither fs Use F-S dithering (default)
-dither none Don't use dithering in quantization
-dither ordered Use ordered dither (medium speed, quality)
-map FILE Map to colors used in named image file
-nosmooth Don't use high-quality upsampling
-onepass Use 1-pass quantization (fast, low quality)
-maxmemory N Maximum memory to use (in kbytes)
-outfile name Specify name for output file
-verbose or -debug Emit debug output
ERROR
test_save_cjpeg_filename (test_shell_injection.TestShellInjection) ... cjpeg: must name one input and one output file
usage: cjpeg [switches] inputfile outputfile
Switches (names may be abbreviated):
-quality N[,...] Compression quality (0..100; 5-95 is useful range)
-grayscale Create monochrome JPEG file
-rgb Create RGB JPEG file
-optimize Optimize Huffman table (smaller file, but slow compression)
-progressive Create progressive JPEG file
-scale M/N Scale image by fraction M/N, eg, 1/2
-targa Input file is Targa format (usually not needed)
Switches for advanced users:
-arithmetic Use arithmetic coding
-block N DCT block size (1..16; default is 8)
-rgb1 Create RGB JPEG file with reversible color transform
-bgycc Create big gamut YCC JPEG file
-dct int Use integer DCT method (default)
-dct fast Use fast integer DCT (less accurate)
-dct float Use floating-point DCT method
-nosmooth Don't use high-quality downsampling
-restart N Set restart interval in rows, or in blocks with B
-smooth N Smooth dithered input (N=1..100 is strength)
-maxmemory N Maximum memory to use (in kbytes)
-outfile name Specify name for output file
-verbose or -debug Emit debug output
Switches for wizards:
-baseline Force baseline quantization tables
-qtables file Use quantization tables given in file
-qslots N[,...] Set component quantization tables
-sample HxV[,...] Set component sampling factors
-scans file Create multi-scan JPEG per script file
ERROR
test_save_netpbm_filename_bmp_mode (test_shell_injection.TestShellInjection) ... SKIP: netpbm not available
test_save_netpbm_filename_l_mode (test_shell_injection.TestShellInjection) ... SKIP: netpbm not available
======================================================================
ERROR: test_load_djpeg (test_file_jpeg.TestFileJpeg)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\Build\Pillow\Pillow-git\Tests\test_file_jpeg.py", line 282, in test_load_djpeg
img.load_djpeg()
File "D:\Build\Pillow\Pillow-git\PIL\JpegImagePlugin.py", line 364, in load_djpeg
subprocess.check_call(["djpeg", self.filename], stdout=f)
File "X:\Python34\lib\subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['djpeg', 'Tests/images/lena.jpg']' returned non-zero exit status 1
======================================================================
ERROR: test_save_cjpeg (test_file_jpeg.TestFileJpeg)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\Build\Pillow\Pillow-git\Tests\test_file_jpeg.py", line 290, in test_save_cjpeg
JpegImagePlugin._save_cjpeg(img, 0, tempfile)
File "D:\Build\Pillow\Pillow-git\PIL\JpegImagePlugin.py", line 610, in _save_cjpeg
subprocess.check_call(["cjpeg", tempfile], stdout=f)
File "X:\Python34\lib\subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cjpeg', 'C:\\Users\\gohlke\\AppData\\Local\\Temp\\tmp3zfmx93y']' returned non-zero exit status 1
======================================================================
ERROR: test_load_djpeg_filename (test_shell_injection.TestShellInjection)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\Build\Pillow\Pillow-git\Tests\test_shell_injection.py", line 35, in test_load_djpeg_filename
im.load_djpeg()
File "D:\Build\Pillow\Pillow-git\PIL\JpegImagePlugin.py", line 364, in load_djpeg
subprocess.check_call(["djpeg", self.filename], stdout=f)
File "X:\Python34\lib\subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['djpeg', "C:\\Users\\gohlke\\AppData\\Local\\Temp\\pillow-tests\\temptests-3.4-script_121_';"]' returned non-zero exit status 1
======================================================================
ERROR: test_save_cjpeg_filename (test_shell_injection.TestShellInjection)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\Build\Pillow\Pillow-git\Tests\test_shell_injection.py", line 40, in test_save_cjpeg_filename
self.assert_save_filename_check(im, JpegImagePlugin._save_cjpeg)
File "D:\Build\Pillow\Pillow-git\Tests\test_shell_injection.py", line 24, in assert_save_filename_check
save_func(src_img, 0, dest_file)
File "D:\Build\Pillow\Pillow-git\PIL\JpegImagePlugin.py", line 610, in _save_cjpeg
subprocess.check_call(["cjpeg", tempfile], stdout=f)
File "X:\Python34\lib\subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cjpeg', 'C:\\Users\\gohlke\\AppData\\Local\\Temp\\tmp3f3_qyhv']' returned non-zero exit status 1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugAny unexpected behavior, until confirmed feature.Any unexpected behavior, until confirmed feature.