diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2018-03-24 01:01:25 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2018-03-24 01:01:25 -0700 |
commit | c8fd35e41fbd5e33f0155ac12ec89ac4048ed37e (patch) | |
tree | 1a9fe2f0e3a0c6be2a84d432c5e61775c73941db | |
parent | 931f07f89512515738ef58577c7df385fec7b7c0 (diff) |
Avoid using dead pointer in _XawTextSetSelection
Reported by: https://bugs.freedesktop.org/show_bug.cgi?id=94375
Fix copied from 2D libXaw commit 11c3a104141e1a4946ad949dfb5514df0b66a031
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/Text.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2508,7 +2508,7 @@ _XawTextSetSelection(TextWidget ctx, XawTextPosition l, XawTextPosition r, if (nelems == 1 && !strcmp (list[0], "none")) return; if (nelems == 0) { - String defaultSel = "PRIMARY"; + static String defaultSel = "PRIMARY"; list = &defaultSel; nelems = 1; } |