task->t.flags = TF_VBEIB;
        task->t.buf_len = sizeof(struct vbe_ib);
        task->buf = &par->vbe_ib;
-       strncpy(par->vbe_ib.vbe_signature, "VBE2", 4);
+       memcpy(par->vbe_ib.vbe_signature, "VBE2", 4);
 
        err = uvesafb_exec(task);
        if (err || (task->t.regs.eax & 0xffff) != 0x004f) {
 static ssize_t v86d_store(struct device_driver *dev, const char *buf,
                size_t count)
 {
-       strncpy(v86d_path, buf, PATH_MAX);
+       strncpy(v86d_path, buf, PATH_MAX - 1);
        return count;
 }
 static DRIVER_ATTR_RW(v86d);