Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Fix null pointer access in strhandle
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
6783c2b
..
de2dd0e
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-1960,10
+1960,10
@@
strhandle(void)
break;
p = strescseq.args[2];
/* FALLTHROUGH */
break;
p = strescseq.args[2];
/* FALLTHROUGH */
- case 104: /* color reset
, here p = NULL
*/
+ case 104: /* color reset */
j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
- if (!strcmp(p, "?"))
+ if (
p &&
!strcmp(p, "?"))
osc4_color_response(j);
else if (xsetcolorname(j, p)) {
if (par == 104 && narg <= 1)
osc4_color_response(j);
else if (xsetcolorname(j, p)) {
if (par == 104 && narg <= 1)