Skip to content

openprinting-ppds: MemoryError #2

@532910

Description

@532910

openprinting-ppds requires too much memory, and doesn't handle this case
correctly:

% /usr/lib/cups/driver/openprinting-ppds cat openprinting-ppds:0/ppd/openprinting/Samsung/PXL/Samsung_M262x_282x_Series_PXL.ppd
Traceback (most recent call last):
  File "/usr/lib/cups/driver/openprinting-ppds", line 119, in <module>
    main()
  File "/usr/lib/cups/driver/openprinting-ppds", line 95, in main
    ppd = cat(args[1])
  File "/usr/lib/cups/driver/openprinting-ppds", line 67, in cat
    ppds['ARCHIVE'] = BytesIO(decompress(base64.b64decode(ppds['ARCHIVE'].encode('ASCII'))))
  File "/usr/lib/cups/driver/openprinting-ppds", line 17, in decompress
    return process.communicate(value)[0]
  File "/usr/lib/python3.7/subprocess.py", line 939, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.7/subprocess.py", line 1711, in _communicate
    stdout = b''.join(stdout)
MemoryError
zsh: exit 1     /usr/lib/cups/driver/openprinting-ppds cat
% free
              total        used        free      shared  buff/cache   available
Mem:          986Mi        55Mi       698Mi       0.0Ki       233Mi       762Mi
Swap:            0B          0B          0B
% apt policy openprinting-ppds 
openprinting-ppds:
  Installed: 20181217-2
  Candidate: 20181217-2
  Version table:
 *** 20181217-2 500
        500 https://deb.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions