apply patch from Matthias Hanel to fix uninitialized buffer and remove unncessary (and logically impossible) copy in get_port_info

git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@151 53a565d1-3bb7-0310-b661-cf11e63c67ab
This commit is contained in:
ddennedy 2004-11-25 18:46:29 +00:00
parent 942638f8be
commit 3de7e65109
1 changed files with 1 additions and 6 deletions

View File

@ -104,6 +104,7 @@ static unsigned int init_rawdevice(struct raw1394_handle *h)
errno = 0;
return -1;
}
memset(h->buffer, 0, HBUF_SIZE);
return req.generation;
}
@ -220,12 +221,6 @@ int raw1394_get_port_info(struct raw1394_handle *handle,
return -1;
}
for (num = req.misc, khl = (struct raw1394_khost_list *) int2ptr(req.recvb);
num && maxports; num--, maxports--, pinf++, khl++) {
pinf->nodes = khl->nodes;
strcpy(pinf->name, khl->name);
}
return req.misc;
}