grTCairo1.c: GrTCairoIconUpdate() potential -1 out-of-bound access
SonarCloud Access of 'char' element in the region at index -1 This was not picked up, even though similar code was.
This commit is contained in:
parent
ee9d4df081
commit
ef7f989da6
|
|
@ -1490,7 +1490,7 @@ char *text;
|
||||||
XSetClassHint( grXdpy, wind, &class);
|
XSetClassHint( grXdpy, wind, &class);
|
||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
if ((brack = strchr(text, '[')))
|
if ((brack = strchr(text, '[')) && brack != text)
|
||||||
{
|
{
|
||||||
brack--;
|
brack--;
|
||||||
*brack = 0;
|
*brack = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue