diff options
Diffstat (limited to 'wcfxo.c')
-rw-r--r-- | wcfxo.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -625,11 +625,12 @@ static int wcfxo_initialize(struct wcfxo *wc) { /* Zapata stuff */ sprintf(wc->span.name, "WCFXO/%d", wc->pos); - sprintf(wc->span.desc, "%s Board %d", wc->variety, wc->pos + 1); + snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Board %d", wc->variety, wc->pos + 1); sprintf(wc->chan.name, "WCFXO/%d/%d", wc->pos, 0); - sprintf(wc->span.location, "PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); + snprintf(wc->span.location, sizeof(wc->span.location) - 1, + "PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); wc->span.manufacturer = "Digium"; - wc->span.devicetype = wc->variety; + strncpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype) - 1); wc->chan.sigcap = ZT_SIG_FXSKS | ZT_SIG_FXSLS | ZT_SIG_SF; wc->chan.chanpos = 1; wc->span.chans = &wc->chan; |