Another problem found by valgrind :

in continue_tail_cap_file, the following test :
else if (*err != 0)
sometimes reads uninitialized memory (so the test might be incorrect).

We now set *err to 0 at the beginning of the function.

svn path=/trunk/; revision=6418
This commit is contained in:
Olivier Abad 2002-10-14 19:59:51 +00:00
parent 75fb72f86e
commit ec3cb87a27

4
file.c
View File

@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
* $Id: file.c,v 1.291 2002/09/23 19:09:47 oabad Exp $
* $Id: file.c,v 1.292 2002/10/14 19:59:51 oabad Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -504,6 +504,8 @@ continue_tail_cap_file(capture_file *cf, int to_read, int *err)
{
long data_offset = 0;
*err = 0;
packet_list_freeze();
while (to_read != 0 && (wtap_read(cf->wth, err, &data_offset))) {