mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 06:07:34 +02:00
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:
committed by
Tim Edwards
parent
29ee094074
commit
a0aea2aa2e
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user