Potential NULL pointer dereference cases
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with the cited sections of filter/rastertopclx.c around line 443 and filter/foomatic-rip/spooler.c around line 229. Trace the return values from cfLutNew() and getenv("HOME") and review nearby error-handling conventions. Done means both potential NULL cases are handled without dereferencing NULL.
Written by the indexing model from the issue text.
Description
Hello! I found some issues via a SAST tool. They are not critical, but I hope this information could be useful.
There are two potential NULL pointer dereference cases:
- filter/rastertopclx.c
ppdLutLoad() and cfLutNew() can return NULL if the nested calloc() function fails. There is no check on line 443:
Add a NULL check of cfLutNew() result.
- filter/foomatic-rip/spooler.c
The HOME environment variable is usually defined in user environments, but this isn't guaranteed.
Add a NULL check of getenv("HOME") result.
- Dominant language
- C
- Stars
- 197
- Forks
- 158
- Avg merge
- 3h 29m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenPrinting/cups-filters
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OpenPrinting/cups-filters#706 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
OpenPrinting/cups-filters#705 · 1 comment ·
-
Difficulty 2/5 Half a day Newbie friendliness 76/100
OpenPrinting/cups-filters#704 · 1 comment ·
-
Division by zero Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenPrinting/cups-filters#689 ·
-
Division by zero Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenPrinting/cups-filters#688 · 3 reactions ·
All issues in OpenPrinting/cups-filters
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·
-
category:port-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100