[media] v4l: xilinx: harmless buffer overflow
[linux-2.6-block.git] / drivers / media / platform / xilinx / xilinx-dma.c
index efde88adf624d62e268d927f1e52d8f4aeb1ee60..98e50e446d57a2b835d93e65992a55ebc1918713 100644 (file)
@@ -653,7 +653,7 @@ static const struct v4l2_file_operations xvip_dma_fops = {
 int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
                  enum v4l2_buf_type type, unsigned int port)
 {
-       char name[14];
+       char name[16];
        int ret;
 
        dma->xdev = xdev;
@@ -725,7 +725,7 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
        }
 
        /* ... and the DMA channel. */
-       sprintf(name, "port%u", port);
+       snprintf(name, sizeof(name), "port%u", port);
        dma->dma = dma_request_slave_channel(dma->xdev->dev, name);
        if (dma->dma == NULL) {
                dev_err(dma->xdev->dev, "no VDMA channel found\n");