Skip to content

ppdc-source: fix potential null dereference - #1673

Open
dhejyuyr wants to merge 1 commit into
OpenPrinting:masterfrom
dhejyuyr:fix-null-dereference
Open

ppdc-source: fix potential null dereference#1673
dhejyuyr wants to merge 1 commit into
OpenPrinting:masterfrom
dhejyuyr:fix-null-dereference

Conversation

@dhejyuyr

Copy link
Copy Markdown
Contributor

In the PPD import utility, according to the import_ppd() function, the values of driver->manufacturer and driver->model_name might be a null pointer, which could lead to the dereference of d->manufacturer and d->model_name in the write_file() function. Also d->manufacturer is usually checked before dereference. It may be not that major, but I haven't able to prove otherwise. My commit perhaps breaks the structure of a writing file, but I relied on the example of a debug print for null values.

Add null checks for manufacturer and model_name to prevent
a potential null dereference.
Signed-off-by: Elizaveta Tereshkina <teryoshkina.ea@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants