grTk1.c: GrTkIconUpdate() 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
ef7f989da6
commit
89fa935416
|
|
@ -1754,7 +1754,9 @@ GrTkIconUpdate(w, text) /* See Blt code */
|
|||
class.res_class = "magic";
|
||||
|
||||
XSetClassHint( grXdpy, wind, &class);
|
||||
if ((brack = strchr(text,'[')))
|
||||
if (text == NULL)
|
||||
return;
|
||||
if ((brack = strchr(text,'[')) && brack != text)
|
||||
{
|
||||
brack--;
|
||||
*brack = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue