grTOGL1.c: GrTOGLIconUpdate() 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
89fa935416
commit
3a35d4d28d
|
|
@ -1539,7 +1539,7 @@ GrTOGLIconUpdate(w,text) /* See Blt code */
|
|||
XSetClassHint( grXdpy, wind, &class);
|
||||
if (text)
|
||||
{
|
||||
if ((brack = strchr(text,'[')))
|
||||
if ((brack = strchr(text,'[')) && brack != text)
|
||||
{
|
||||
brack--;
|
||||
*brack = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue