diff options
Diffstat (limited to 'sys/net/if_atmsubr.c')
-rw-r--r-- | sys/net/if_atmsubr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index a41bfaf..9f56a9b 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -521,14 +521,16 @@ pvc_ioctl(shadow, cmd, data) */ switch (cmd) { case SIOCGPVCSIF: - sprintf(ifr->ifr_name, "%s%d", ifp->if_name, ifp->if_unit); + snprintf(ifr->ifr_name, sizeof(ifr->ifr_name), + "%s%d", ifp->if_name, ifp->if_unit); return (0); case SIOCGPVCTX: do { struct pvctxreq *pvcreq = (struct pvctxreq *)data; - sprintf(pvcreq->pvc_ifname, "%s%d", + snprintf(pvcreq->pvc_ifname, + sizeof(pvcreq->pvc_ifname), "%s%d", ifp->if_name, ifp->if_unit); pvcreq->pvc_aph = pvcsif->sif_aph; } while (0); |