gcr/gcrDebug.c Add a field width specifier to this "%s" placeholder.
Unbounded local buffer used in fscanf() string extraction call. Add width to specified to ensure truncation as 24 character instead of buffer overflow. SonarCloud https://sonarcloud.io/project/issues?open=AZJB17OzNGfDNup0Rj9x&id=dlmiles_magic
This commit is contained in:
parent
29ee094074
commit
a0aea2aa2e
|
|
@ -195,7 +195,7 @@ gcrMakeChannel(ch, fp)
|
|||
* p and P mean poly is blocked. Upper case means vacate the
|
||||
* column, lower case means vacate the track.
|
||||
*/
|
||||
if (fscanf(fp, "%s", s) != 1)
|
||||
if (fscanf(fp, "%24s", s) != 1)
|
||||
{
|
||||
TxError("Format error in router input file\n");
|
||||
return (FALSE);
|
||||
|
|
|
|||
Loading…
Reference in New Issue