diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-09 11:23:12 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-12-15 14:26:15 -0800 |
commit | 9ca09ffe72641e9af0f825ad0bda9241690e7058 (patch) | |
tree | 842da2b5fabdd056af820193497cfa368de5a335 | |
parent | e69782d704ccd7dc702ede378be00fa6999d5b0c (diff) |
TDFXDRIScreenInit: Use snprintf instead of sprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/tdfx_dri.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tdfx_dri.c b/src/tdfx_dri.c index 6d86532..5faf5d1 100644 --- a/src/tdfx_dri.c +++ b/src/tdfx_dri.c @@ -139,7 +139,7 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen) pDRIInfo->busIdString = DRICreatePCIBusID(pTDFX->PciInfo); } else { pDRIInfo->busIdString = malloc(64); - sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d", + snprintf(pDRIInfo->busIdString, 64, "PCI:%d:%d:%d", ((pciConfigPtr)pTDFX->PciInfo->thisCard)->busnum, ((pciConfigPtr)pTDFX->PciInfo->thisCard)->devnum, ((pciConfigPtr)pTDFX->PciInfo->thisCard)->funcnum); |