Commit 6b09b19
committed
backend: guard prctl(PR_SET_NAME) against NULL thread name
o->comm may be NULL if job initialization fails or the job
structure is only partially initialized before thread creation.
Calling prctl(PR_SET_NAME, NULL) results in a NULL pointer
dereference inside strncpy().
Add a NULL check before calling prctl().
Reported-by: Criticayon Black
Signed-off-by: Criticayon Black <1318083585@qq.com>1 parent 4db5740 commit 6b09b19
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1823 | 1823 | | |
1824 | 1824 | | |
1825 | 1825 | | |
| 1826 | + | |
1826 | 1827 | | |
1827 | 1828 | | |
1828 | 1829 | | |
| |||
0 commit comments